android默認頁面幾秒後自動跳轉另一頁面
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了。