diff options
Diffstat (limited to 'Xamarin.Forms.Platform.Android/Forms.cs')
-rw-r--r-- | Xamarin.Forms.Platform.Android/Forms.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.Android/Forms.cs b/Xamarin.Forms.Platform.Android/Forms.cs index 65bfbc4d..a089ea9a 100644 --- a/Xamarin.Forms.Platform.Android/Forms.cs +++ b/Xamarin.Forms.Platform.Android/Forms.cs @@ -362,7 +362,15 @@ namespace Xamarin.Forms return new _IsolatedStorageFile(IsolatedStorageFile.GetUserStoreForApplication()); } - public bool IsInvokeRequired => !Looper.MainLooper.IsCurrentThread; + public bool IsInvokeRequired + { + get + { + if ((int)Build.VERSION.SdkInt >= 23) + return !Looper.MainLooper.IsCurrentThread; + return Looper.MainLooper != Looper.MyLooper(); + } + } public void OpenUriAction(Uri uri) { |