Skip to content

Instantly share code, notes, and snippets.

Created June 23, 2016 10:56
What would you like to do?
Extension to see if a thread is the main(UI) thread for Xamarin Android.
using Android.OS;
using Java.Lang;
namespace Droid
public static class ThreadUtil
public static bool IsMainThread(this Thread currentThread)
return currentThread == Looper.MainLooper.Thread;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment