How to add a splash screen in an android application

 

This article expects that you have your development enviorment set up and you have installed Eclipse and Android SDK and you have developed at least an application in android and are aware of the structure of the android application.

Create a new android application using the details as below:

SplashScreenApp1

SplashScreenApp1

Add a new XML File called splash.xml in layout folder where you already have main.xml. Then open strings.xml (present in values folder) and splash.xml and main.xml (present in layout folder) and add the following code to it.

SplashScreenApp3

SplashScreenApp3

Open AndroidManifest.xml and add and change the entry for the intents

 

SplashScreenApp4

SplashScreenApp4

Add a new java class SplashScreen in the source

SplashScreenApp5

SplashScreenApp5

And then open SplashScreen.java and change the code to below:

SplashScreenApp6

SplashScreenApp6

Now just run the application as Android application and you will see the splash screen for 5 seconds (5000 ms) as specified in SplashScreen.java

Hope you like this…..let me know your comments 🙂

If you have any questions then please feel free to ask me.