title: How to check if running on UI thread in Android?
body: <p>How can I know if the running code is executed on the main thread (UI thread)?<br>
  With Swing I use the <code>isEventDispatchThread</code> method...</p>