public class Dispatcher
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Dispatcher.InvalidateRunnable
Runnable which requests layout and invalidates for specified view
|
static class |
Dispatcher.InvisibleRunnable
Runnable which set view's visibility to
View.INVISIBLE |
static class |
Dispatcher.RequestLayoutRunnable
Runnable which requests layout for specified view
|
static class |
Dispatcher.VisibleRunnable
Runnable which set view's visibility to
View.VISIBLE |
Constructor and Description |
---|
Dispatcher() |
Modifier and Type | Method and Description |
---|---|
static void |
cancel(java.lang.Runnable runnable)
Cancels execution of
Runnable on the UI thread |
static boolean |
isUiThread()
Checks whether the method is called from UI thread
|
static void |
postDelayedOnUiThread(java.lang.Runnable runnable,
long delay)
Posts and runs
Runnable from UI thread with some delay |
static void |
postOnUiThread(java.lang.Runnable runnable)
Posts and runs
Runnable from UI thread |
static void |
runOnUiThread(java.lang.Runnable runnable)
Runs the specified runnable on the UI thread.
|
public static void postOnUiThread(java.lang.Runnable runnable)
Runnable
from UI threadrunnable
- The Runnable
to runpublic static void runOnUiThread(java.lang.Runnable runnable)
runnable
- The Runnable
to runpublic static void postDelayedOnUiThread(java.lang.Runnable runnable, long delay)
Runnable
from UI thread with some delayrunnable
- The Runnable
to rundelay
- The delay for executionpublic static void cancel(java.lang.Runnable runnable)
Runnable
on the UI threadrunnable
- The runnable to cancelpublic static boolean isUiThread()