diff options
-rw-r--r-- | Xamarin.Forms.Platform.Android/Forms.cs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Xamarin.Forms.Platform.Android/Forms.cs b/Xamarin.Forms.Platform.Android/Forms.cs index a2a063c9..c2dc770b 100644 --- a/Xamarin.Forms.Platform.Android/Forms.cs +++ b/Xamarin.Forms.Platform.Android/Forms.cs @@ -264,9 +264,7 @@ namespace Xamarin.Forms public void BeginInvokeOnMainThread(Action action) { - var activity = Context as Activity; - if (activity != null) - activity.RunOnUiThread(action); + new Handler(Looper.MainLooper).Post(action); } public Ticker CreateTicker() |