How to do a Thread ?
private Handler handler = new Handler() {
public void handleMessage(Message msg) {
super.handleMessage(msg);
}
};
new Thread(new Runnable() {
public void run() {
while (true) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
}
handler.sendEmptyMessage(0);
}
}
}).start();
No comments:
Post a Comment