判断当前线程是否是在主线程中

Looper.myLooper() == Looper.getMainLooper() 是可以帮助你确定你是否在主线程的代码。

 

posted @ 2015-11-25 13:11  我是一颗小草  阅读(1103)  评论(0编辑  收藏  举报