延时跳转Activity

延时跳转Activity

 private Handler mHandler = new Handler();
 private Intent mIntent;

 //延时执行
 mHandler.postDelayed(new Runnable() {
            @Override
                //跳转到MainActivity
                mIntent = new Intent(WelcomeActivity.this, MainActivity.class);
                startActivity(mIntent);
            }
        }, 3000);//3000微妙后跳转

你可能感兴趣的:(学习日志)