public class UiThreadUtil
extends java.lang.Object
| Constructor and Description |
|---|
UiThreadUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertNotOnUiThread()
Throws a
AssertionException if the current thread is the UI thread. |
static void |
assertOnUiThread()
Throws a
AssertionException if the current thread is not the UI thread. |
static boolean |
isOnUiThread() |
static void |
runOnUiThread(java.lang.Runnable runnable)
Runs the given Runnable on the UI thread.
|
public static boolean isOnUiThread()
public static void assertOnUiThread()
AssertionException if the current thread is not the UI thread.public static void assertNotOnUiThread()
AssertionException if the current thread is the UI thread.public static void runOnUiThread(java.lang.Runnable runnable)