利用TimerHandler做一个闪烁10次的效果
pEntity.registerUpdateHandler(new TimerHandler(0.3f, true, new ITimerCallback() {
int count =20;
@Override
public void onTimePassed(TimerHandler pTimerHandler) {
count--;
if(count>0){
pEntity.setVisible(count%2==1);
}else{
pEntity.unregisterUpdateHandler(pTimerHandler);
}
}
}));
http://www.eoeandroid.com/forum-863-1.html
TimerHandler的简单应用,布布扣,bubuko.com
原文地址:http://9165326.blog.51cto.com/9155326/1439364