Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.75 KB

README.md

File metadata and controls

44 lines (31 loc) · 1.75 KB

Android Splash Screen

Material Android Splash Screen

Android Splash Screen is the first screen visible to the user when the application’s launched. Splash screen is one of the most vital screens in the application since it’s the user’s first experience with the application.

Splash screens are used to display some animations (typically of the application logo) and illustrations while some data for the next screens are fetched.

Preview

Implementation

Now the timer is based on postDelayed() public method. This method will help us to queue a process to a certain period of time that we set for the method and app will perform that task after that time period.

First we set the time for the timer using a very simple int SPLASH_TIME variable

int SPLASH_TIME = 3000; //This is 3 seconds
new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                //Do any action here. Now we are moving to next page
                Intent intent = new Intent(SplashScreenActivity.this, MainActivity.class);
                startActivity(intent);
                //This 'finish()' is for exiting the app when back button pressed from Home page which is MainActivity
                finish();
            }
        }, SPLASH_TIME);



Hey, while you're here why don't you think of following Us for awesome projects like this, ah? Follow Us on Our Profile!


This app make it easy for you to implement Splash screen very easily into your Android App.