Splash Screen in Android

Every one know about Splash Screen. Splash Screen is basically used when some application take time to load data from database or web server before starting.  Or to just show for branding.

In our tutorial we just use second scenario for show splash screen before start application.

Make two activity called SpashScreen.java and MainActivity.java . We start SplashScreenActivity as a launcher activity.

activity_splash_screen.xml

 

SplashScreen.java

Here a simple java Thread is called. When activity start a thread start running in background and sleep for 4 seconds. Then it wake up and start new Activity called MainActivity.java and finish current activity.

MainActivity.java

activity_main.xml

our AndroidManifest.xml

Now run project. Our output look like this.

android-splash-screen-output-skynils

Download Project.

downlod

(Visited 611 times, 1 visits today)