anroid 页面停留几秒后跳转

android默认页面几秒后自动跳转另一页面

 
super.onCreate(paramBundle);
setContentView(R.layout.splash_screen_view);
final Intent localIntent=new Intent(this,Main.class);
Timer timer=new Timer();
TimerTask tast=new TimerTask()
{
@Override
public void run(){
startActivity(localIntent);
}
};
timer.schedule(tast,DELAY);

pretendIntent。
或者用线程sleep(3000),然后发起一个intent
比如:
try{
sleep(1000);
}catch (Exception e) {
}
Intent intent = new Intent(this,XXXX.class);
startActivity(intent);
这样1秒后,就会跳转到另一个activity了。

你可能感兴趣的:(自动跳转,anroid)