mTimer = new Timer();
mTimerTask = new TimerTask()
{
@Override
public void run()
{
Message msg = new Message();
msg.what = delta;
mHandler.sendMessage(msg);
}
};
mTimer.schedule(mTimerTask, delaytime, delaytime);
}
Handler mHandler = new Handler() {
@Override
public void handleMessage(Message msg)
{
换图
}
}
用一个Timer去实现,间歇时间内去改变界面