<span style="white-space:pre"> </span>//实现等待几秒后跳转,方法一
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Intent intent = new Intent(MainActivity.this,
ExampleActivity.class);
startActivity(intent);
}
}, SPLASH_DISPLAY_LENGHT);
//实现等待几秒后跳转,方法二
final Intent localIntent = new Intent(this, ExampleActivity.class);
Timer timer = new Timer();
TimerTask tast = new TimerTask() {
@Override
public void run() {
startActivity(localIntent);
}
};
timer.schedule(tast, SPLASH_DISPLAY_LENGHT);