Android Splash Screen & Progress Bar Tutorial

Splash Screen is a graphical image occur just a few second when starting the application. Android application may need to loading some heavy data in the beginning. In this situation, we using splash screen to load all the data before go to main activity. Sometime we use splash screen to identify our application name , logo and do some introduction about the application. In this tutorial, I will teach you how to make android splash screen in the application.

Creating a New Project

1. Open Android Studio IDE in your computer.
2. Create a new project and Edit the Application name to “SplashScreenExample”.
(Optional) You can edit the company domain or select the suitable location for current project tutorial. Then click next button to proceed.
3. Select Minimum SDK (API 15:Android 4.0.3 (IceCreamSandwich). I choose the API 15 because many android devices currently are support more than API 15. Click Next button.
4. Choose “Empty Activity” and Click Next button
5. Lastly, press finish button.

Add a New Empty Activity

Right click your java package name > New > Activity > Empty Activity to add a activity. Rename your activity name as SplashScreen. In this steps, it will automatically generate xml and java file for splash screen activity.

Edit activity_splash_screen.xml layout

Go to activity_splash_screen.xml that just automatic generate. Add ProgressBar in this layout and put the style to the following source code.

Edit class

Next, navigate to and edit to the following source code. This class will handler 2 seconds delay to the MainActivity. I set this activity to full screen with no action bar.

Edit activity_main.xml layout

Last, go to activity_main.xml and edit text field to indicant you are navigate to this layout.

Run your project

Finally, you can run your project in your android application. It is just simple, you can test the feature to find out the behaviour of source code.

(Android Splash Screen)

Source Code

(Visited 5,229 times, 1 visits today)

Yong Loon Ng

Ng Yong Loon, better known as Kristofer is a software engineer and computer scientist who doubles up as an entrepreneur.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *