class MyThread extends Thread {
private Handler handler;
//public Looper looper;
@Override
public void run() {
// 创建一个looper
Looper.prepare();
//looper=Looper.myLooper();
handler = new Handler() {
@Override
public void handleMessage(Message msg) {
System.out.println("currentThread--------->"
+ Thread.currentThread());
};
};
Looper.loop();
}
}
目前暂无任何回答
- 0 回答
- 0 关注
- 1097 浏览
添加回答
举报
0/150
提交
取消