You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
939 B

using System;
using System.Collections;
using Android.App;
using Android.Views;
using Android.Widget;
using TheGameExtreme.Droid.Services;
using TheGameExtreme.Interface;
[assembly: Xamarin.Forms.Dependency(typeof(MessageAndroid))]
namespace TheGameExtreme.Droid.Services
{
public class MessageAndroid : IMessage
{
public IDictionary Properties => throw new NotImplementedException();
public void LongAlert(string message)
{
Toast toast = Toast.MakeText(Application.Context, message, ToastLength.Long);
toast.SetGravity(GravityFlags.Center | GravityFlags.Center, 0, 0);
toast.Show();
}
public void ShortAlert(string message)
{
Toast toast = Toast.MakeText(Application.Context, message, ToastLength.Short);
toast.SetGravity(GravityFlags.Center | GravityFlags.Center, 0, 0);
toast.Show();
}
}
}