01 public class welcome extends Activity { 02 public void onCreate(Bundle savedInstanceState) { 03 super.onCreate(savedInstanceState); 04 this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏 05 this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);//去掉信息栏 06 setContentView(R.layout.welcome); 07 final Intent intent2 = new Intent(welcome.this, 08 MainActivity.class); 09 Timer timer = new Timer(); 10 TimerTask task = new TimerTask() { 11 @Override 12 public void run() { 13 startActivity(intent2); 14 finish(); // 执行 15 } 16 }; 17 timer.schedule(task, 1000 * 2); // 2秒后 18 19 } 20 }