public void ShowNotification(string message, NotificationLength length) { Application.SynchronizationContext.Post(ignored => { if (CurrentActivity != null) { var toastLength = length == NotificationLength.Short ? ToastLength.Short : ToastLength.Long; Toast.MakeText(CurrentActivity, message, toastLength).Show(); } }, null); }
public void ShowNotification(string message, NotificationLength length) { _dialogService.ShowNotification(message, length); }