app/src/main/java/com/abhijith/nanodegree/geonotes/View/SplashActivity.java
// After completion of 2500 ms, the next activity will get started.
After completion of 2500 ms, the next activity will get started.
After completion of 2500 ms the next activity will get started .
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
        new Handler().postDelayed(() -> {
            Intent i = new Intent(SplashActivity.this,
                    LoginActivity.class);
            startActivity(i);
            finish();
        }, SPLASH_SCREEN_TIME_OUT);
    }
@ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( R . layout . activity_splash ) ; getWindow ( ) . setFlags ( WindowManager . LayoutParams . FLAG_FULLSCREEN , WindowManager . LayoutParams . FLAG_FULLSCREEN ) ; new Handler ( ) . postDelayed ( ( ) -> { Intent i = new Intent ( SplashActivity . this , LoginActivity . class ) ; startActivity ( i ) ; finish ( ) ; } , SPLASH_SCREEN_TIME_OUT ) ; }
After completion of 2500 ms, the next activity will get started.
After completion of 2500 ms the next activity will get started .
//This method is used so that your splash activity //can cover the entire screen. //Intent is used to switch from one activity to another. //invoke the SecondActivity. //the current activity will get finished.