Android examples for java.lang:Thread
is Ui Thread
import android.content.Context; public class Main{ public static boolean isUiThread(Context context) { return Thread.currentThread().equals( context.getMainLooper().getThread()); }//w w w .java 2 s.com }