timer计时跳转

final Intent it = new Intent(this, Main2Activity.class); //你要转向的Activity
        Timer timer = new Timer();
        TimerTask task = new TimerTask() {
            @Override
            public void run() {
                startActivity(it); //执行
            }
        };
        timer.schedule(task, 1000 * 10); //10秒后

你可能感兴趣的:(timer计时跳转)