android 打开app先显示欢迎界面后自动跳到主界面

 1     @Override
 2     protected void onCreate(Bundle savedInstanceState) {
 3         super.onCreate(savedInstanceState);
 4         setContentView(R.layout.activity_main);
 5         getSupportActionBar().hide();
 6         new Handler().postDelayed(new Runnable() {
 7             @Override
 8             public void run() {
 9                 Intent in = new Intent(MainActivity.this, ManagerActivity.class);
10                 startActivity(in);
11             }
12         }, 2000);
13     }

首先加载欢迎界面,欢迎界面加载完毕后,线程睡眠两秒,跳转主界面!

posted @ 2016-12-02 14:52  疯子~  阅读(4348)  评论(0编辑  收藏  举报