android 启动欢迎界面

Handler handler =newHandler();

@Override

protected voidonCreate(@Nullable Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.welcome);

handler.postDelayed(newRunnable() {

public voidrun() {

Intent intent =newIntent(Welcome.this,MainActivity.class);

startActivity(intent);

finish();

}

},2000);//2秒后跳转

}

你可能感兴趣的:(android 启动欢迎界面)