/// <summary> /// /// </summary> /// <param name="text"></param> /// <param name="toastTime"></param> /// <param name="snackbar"></param> /// <param name="command"></param> public void DisplayToast(string text, ToastTime toastTime = ToastTime.SHORT, bool snackbar = false, ICommand command = null) { Device.BeginInvokeOnMainThread(async() => { await Xamarin.Forms.Application.Current.MainPage.DisplayAlert("", text, "Ok"); }); }
public void Show(string InMsg, ToastTime InToastTime = ToastTime.Middle) { toastQueue.Enqueue(new ToastInfo(InMsg, InToastTime)); if (!isToastPlaying) { StartCoroutine(Play()); } }
public void DisplayToast(string message, ToastTime toastTime) { var config = new ToastConfig(message) { Duration = TimeSpan.FromSeconds((double)toastTime) }; UserDialogs.Instance.Toast(config); }
public void Toast(string content, ToastTime showFor) { var context = Mvx.Resolve <IMvxAndroidCurrentTopActivity>(); var toast = Android.Widget.Toast.MakeText( context.Activity, content, showFor == ToastTime.Short ? ToastLength.Short : ToastLength.Long); toast.Show(); }
public static void Toast(string message, ToastTime toastTime) { switch (toastTime) { case ToastTime.ShortTime: DependencyService.Get <IToastMessage>().ShortTime(message); break; case ToastTime.LongTime: DependencyService.Get <IToastMessage>().LongTime(message); break; } }
public IDisposable DisplayToast(string message, ToastTime toastTime, string actionText, Action action) { var config = new ToastConfig(message) { Duration = TimeSpan.FromSeconds((double)toastTime), Action = new ToastAction { Text = actionText, TextColor = System.Drawing.Color.DodgerBlue, Action = action } }; return(UserDialogs.Instance.Toast(config)); }
public void DisplayToast(string text, ToastTime toastTime = ToastTime.SHORT, bool snackbar = false, ICommand command = null) { Toast.MakeText(Application.Context, text, toastTime == ToastTime.SHORT ? ToastLength.Short : ToastLength.Long).Show(); }
public ToastInfo(string InMsg, ToastTime InShowTime) { Msg = InMsg; ShowTime = InShowTime; }
public void Toast(string content, ToastTime showFor) { this.Dialog(AppResources.ApplicationTitle, content); }