boolean isMainThread = Looper.myLooper() == Looper.getMainLooper(); 如果isMainThread == true表明當前代碼在UI線程中執(zhí)行