80,358
社区成员
发帖
与我相关
我的任务
分享
MyAnimationRoutine mar= new MyAnimationRoutine();
Timer t=new Timer(false);
t.schedule(mar,100);
class MyAnimationRoutine extends TimerTask{
@Override
public void run()
{
Log.i(TAG,"MyAnimationRoutine:run");
aniDraw.setOneShot(true);
aniDraw.start();
}
Timer timer = new Timer();
timer.schedule(new TimerTask(){
private int count = 0;
@Override
public void run() {
// TODO Auto-generated method stub
if (count>1){
animationDrawable.setOneShot(false);
animationDrawable.stop();
animationDrawable.start();
cancel();
}
count++;
Log.d("MyAndroid", "count++");
}
}, 0, 100);