List of usage examples for android.os Handler Handler
@UnsupportedAppUsage public Handler(boolean async)
From source file:Main.java
public static void runOnUi(Runnable task) { new Handler(Looper.getMainLooper()).post(task); }
From source file:Main.java
public static void runOnUiThread(Runnable action) { new Handler(Looper.getMainLooper()).post(action); }
From source file:Main.java
private static void scheduleOnMainThread(Runnable r) { new Handler(Looper.getMainLooper()).post(r); }
From source file:Main.java
public static void runOnUiThread(Runnable runnable) { new Handler(Looper.getMainLooper()).post(runnable); }
From source file:Main.java
public static void scheduleOnMainThread(Runnable r) { new Handler(Looper.getMainLooper()).post(r); }
From source file:Main.java
public static void gcDelay(long delay) { new Handler(Looper.getMainLooper()).postDelayed(new Runnable() { @Override/*w ww .j a v a 2s .co m*/ public void run() { gc(); } }, delay); }
From source file:Main.java
public static void run(final Runnable runnable) { Handler handler = new Handler(Looper.getMainLooper()); handler.post(new Runnable() { @Override// w w w . ja v a 2s . co m public void run() { runnable.run(); } }); }
From source file:Main.java
public static void scheduleDelayedTask(Runnable task, long delay) { Handler handler = new Handler(Looper.getMainLooper()); handler.postDelayed(task, delay);/*from w w w . j a va 2 s .c o m*/ }
From source file:Main.java
public static void runOnUiThread(final Runnable runnable) { if (Looper.myLooper() != Looper.getMainLooper()) { new Handler(Looper.getMainLooper()).post(runnable); } else {// w w w. jav a 2 s.c o m runnable.run(); } }
From source file:Main.java
public static Handler getMainHandler() { if (handler == null) { handler = new Handler(Looper.getMainLooper()); }/* www . ja v a2s .c o m*/ return handler; }