void OnDismiss()
 {
     OnVisualStateChanged(() => {
         if (!isTimedOut)
         {
             Toast.Dismiss();
         }
     }, vsDismissed);
 }
Exemplo n.º 2
0
 public void Toast(string text, bool longDuration = false)
 {
     if (!_toast?.Dismissed ?? false)
     {
         _toast.Dismiss(false);
     }
     _toast = new Toast(text)
     {
         Duration = TimeSpan.FromSeconds(longDuration ? 5 : 3)
     };
     if (TabBarVisible())
     {
         _toast.BottomMargin = 55;
     }
     _toast.Show();
     _toast.DismissCallback = () =>
     {
         _toast?.Dispose();
         _toast = null;
     };
 }
Exemplo n.º 3
0
 public void DismissToast()
 {
     Toast.Dismiss();
 }