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

  • Krishna

    Keep up the good work! It’s super duper. Helping me a lot. Hoping for new posts in quick time !!!

    • Thanks Krishna.!! Please mail me what kind of post you want, so i can share my knowledge.

  • Harsh Bhavsar

    WHere is code line for hide Status bar in Splash Screen..???

    • declare you activity theme in AndroidMainfest.xml as
      android:theme=”@android:style/Theme.NoTitleBar.Fullscreen” for full screen.

  • Rutul Patel

    Super splash screen example..!!