new Thread(new Runnable() {
@Override
public void run() {
Log.e(“qdx”, "step 0 ");
Looper.prepare();
Toast.makeText(MainActivity.this, "run on Thread", Toast.LENGTH_SHORT).show();
Log.e("qdx", "step 1 ");
Looper.loop();
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
e.printStackTrace();
}
Looper.myLooper().quit();
Log.e("qdx", "step 2 ");
}
}).start();
老师请教下我Looper.myLooper().quit();退出loop循环, Log.e("qdx", "step 2 ");这段log没打出来