In my previous posts I explained you how to Implement Animated Screen in Android and Splash screen with Ken Burns view. In this post I will explain you how to show a random image in Splash screen when your Android app is launched every time. Which gives a Fresh look to your Android App users. And it is very easy to implement though.

Note:- If you want detailed explanation of code watch the Video Below

Procedure:

  • Open your existing Android studio project or create a new Android Studio Project.
  • Create a new Java Class with name Splashscreen . Now remove whole code in it except first line with your package name and paste below code into it after the first line.

 

  • Then create new XML Layout with Name activity_splashscreen. Remove complete code in it  and paste below code into it.

  • Next open your Androidmanifest.xml and add Splashscreen activity there and make in launcher in intent-filter like below.

  • If you have another activity as launcher change it to default. For example Mainactivity
  • Finally copy splash_image1, splash_image2, splash_image3 to drawable folder either in PNG or JPG.
  • Now export to apk or run app in your device or emulator using ADB.

 

Download Source code from below link.

[ihc-hide-content ihc_mb_type=”show” ihc_mb_who=”reg” ihc_mb_template=”1″ ]Download our app from PlayStore and go to categories tab and Tap on Downloads to get Source code.[/ihc-hide-content]