Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. package com.example.android.midtoumobile;
  2.  
  3. import android.content.Intent;
  4. import android.os.Handler;
  5. import android.support.v7.app.AppCompatActivity;
  6. import android.os.Bundle;
  7. import android.view.WindowManager;
  8.  
  9. public class MainActivity extends AppCompatActivity {
  10.  
  11.     private static int SPLASH_TIME_OUT = 4000;
  12.  
  13.     @Override
  14.     protected void onCreate(Bundle savedInstanceState) {
  15.         super.onCreate(savedInstanceState);
  16.         getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
  17.                 WindowManager.LayoutParams.FLAG_FULLSCREEN);
  18.         setContentView(R.layout.activity_main);
  19.         new Handler().postDelayed(new Runnable(){
  20.             @Override
  21.             public void run(){
  22.                 Intent homeIntent = new Intent(MainActivity.this,  SplashScreen.class);
  23.                 startActivity(homeIntent);
  24.                 finish();
  25.             }
  26.         },SPLASH_TIME_OUT);
  27.     }
  28. }