1. 程式人生 > >三秒後跳轉

三秒後跳轉

n) out HA PE ride over ams lag delayed

 private Handler mHandler = new Handler(new Handler.Callback() {
      @Override
      public boolean handleMessage(Message msg) {
          if (msg!=null){

              Intent intent = new Intent(MainActivity.this,GuidePage.class);
              startActivity(intent);

          }
          return
true; } }); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
new Thread(){ @Override public void run() { super.run(); Message message = new Message(); mHandler.sendMessageDelayed(message,3000); } }.start(); }

三秒後跳轉