Create Animated Splash Screen in Android

Create a new project in Eclipse named AnimatedSplashScreen

AnimatedSplashScreenDoid1

AnimatedSplashScreenDoid1Add the following code to the strings.xml present in values folderstrings.xml

Create a new xml file in the res/layout folder named splash.xml and add the following code to it.

splash.xml

splash.xml

Add the following code to AndroidManifest.xml

AndroidManifest.xml

AndroidManifest.xml

Now add the following code to AnimatedSplashScreenActivity.java

 

AnimatedSplashScreenActivity.java

AnimatedSplashScreenActivity.java

 

AnimatedSplashScreenActivity.java

AnimatedSplashScreenActivity.java

Add a new class in the src folder and named MainActivity and add the following code to it.

MainActivity.java

MainActivity.java

And finally add the following code to main.xml

main.xml

main.xmlNow run the application and you will see a screen like below:Animated Splash Screen

 

  • geek

    I get this error

    anim cannot be resolved or is not a field in the line Animation fade1 = AnimationUtils.LoadAnimation(this,R.anim.fade_in);

    please help.