post On Ui Thread Delayed - Android java.lang

Android examples for java.lang:Thread

Description

post On Ui Thread Delayed

Demo Code


//package com.java2s;
import android.os.Handler;
import android.os.Looper;

public class Main {
    public static void postOnUiThreadDelayed(Runnable action,
            long delayMillis) {
        new Handler(Looper.getMainLooper())
                .postDelayed(action, delayMillis);
    }/*w w w.  j a v  a2 s .  c  o m*/
}

Related Tutorials