标签:android 使用 java sp c 问题 on log 代码
class testThread extends Thread{ public void run() { Message message = new Message(); mHandler.sendMessage(message); } } //在handler中更新UI private Handler mHandler = new Handler(){ public void handleMessage(Message msg) { textView.setText("你想变的内容"); }; };
private final Timer timer = new Timer(); private TimerTask task; Handler handler = new Handler() { @Override public void handleMessage(Message msg) { // TODO Auto-generated method stub textView.setText("XXXX"); super.handleMessage(msg); } }; task = new TimerTask() { @Override public void run() { // TODO Auto-generated method stub Message message = new Message(); message.what = 1; handler.sendMessage(message); } }; timer.schedule(task, 1000, 1000);
标签:android 使用 java sp c 问题 on log 代码
原文地址:http://www.cnblogs.com/meizhenfen42/p/4011138.html