标签:
class LocThread extends Thread{
@Override
public void run() {
while (true){
try {
Thread.sleep(99);
Message msg=new Message();
msg.what=1;
locHandler.sendMessage(msg);
}catch (Exception e){
e.printStackTrace();
}
}
}
}
private Handler locHandler=new Handler() {
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
switch(msg.what){
case 1:showText();break; //需要实时显示的东西的方法
}
}
};
标签:
原文地址:http://www.cnblogs.com/jetereting/p/4437957.html