我正在创建一个有时间限制的测验,但我不知道要在我的 1 级课程中实现什么时间限制。我应该执行什么?你能给我看一个完整的代码吗?
我对么?
private Runnable task = new Runnable() {
public void run() {
Intent intent = new Intent(getApplicationContext(),MainMenu.class);
startActivity(intent);
}
};
private void onCreate() {
Handler handler = new Handler();
handler.postDelayed(task, 60000);