这是我的代码:
package com.example.analogclock;
import android.view.View;
public class MyThread implements Runnable {
private View view;
public MyThread(View v){
view = v;
}
public void run() {
while(true){
try {
Thread.sleep(1000);
view.postInvalidate();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}