android - 在新的线程中,显示ToastMessage
访问量: 1883
https://www.oschina.net/question/163910_31439
代码如下:
// 某个线程结束后,在call back中。。。(例如ok http)
Thread(){
public void run() {
Log.i("log", "run");
Looper.prepare();
Toast.makeText(ScannerActivity.this, R.string.bind_account_successfully, Toast.LENGTH_SHORT).show();
Looper.loop();// 进入loop中的循环,查看消息队列
};
}.start();