延迟3秒切换窗口(闪屏)

1
2
3
4
5
6
7
new Handler().postDelayed(new Runnable() {
public void run() {
Intent mainIntent = new Intent(LoadActivity.this, MainActivity.class);
LoadActivity.this.startActivity(mainIntent);
LoadActivity.this.finish();
}
}, 3000); // 3 秒