is UI Thread - Android Android OS

Android examples for Android OS:Thread

Description

is UI Thread

Demo Code


//package com.java2s;

import android.os.Looper;

public class Main {
    public static boolean isUIThread() {
        return Looper.getMainLooper().getThread() == Thread.currentThread();
    }//from ww w.  j  av  a 2 s .  co  m
}

Related Tutorials