Example #1
0
 public void Show(string text, ToastLenght lenght = ToastLenght.Short)
 {
     //if (lenght == ToastLenght.Short)
     //{
     //    Android.Widget.Toast.MakeText(Android.App.Application.Context, text, ToastLength.Short).Show();
     //}
     //else
     //{
     //    Android.Widget.Toast.MakeText(Android.App.Application.Context, text, ToastLength.Long).Show();
     //}
 }
Example #2
0
 public void Show(string text, ToastLenght lenght = ToastLenght.Short)
 {
     if (lenght == ToastLenght.Short)
     {
         Android.Widget.Toast.MakeText(Android.App.Application.Context, text, ToastLength.Short).Show();
     }
     else
     {
         Android.Widget.Toast.MakeText(Android.App.Application.Context, text, ToastLength.Long).Show();
     }
 }
    public void ShowToast(string _message, ToastLenght _type)
    {
        int type = 0;

        if (_type == ToastLenght.LENGTH_SHORT)
        {
            type = 0;
        }
        else
        {
            type = 1;
        }
        object[] objects = { _message, type };
        Androidjavaclass.CallStatic("ShowToast", objects);
    }