android image view全屏显示一张图片,隔几秒换一张图片,求源码~

2025-01-06 15:25:41
推荐回答(2个)
回答1:

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)
{
换图
}
}

回答2:

用一个Timer去实现,间歇时间内去改变界面