Android splash screen is normally used to show/display app or brand logo before launching application activity. Nowadays some of the popular android applications like Facebook, Dropbox, Skype, etc use splash screen. Splash screen can be used to display advertisement, process bar or loading, to provide information of application for new users etc. So, in this tutorial, you will learn to make/create a splash screen in your android application to show before application content appear.
There are many ways to make splash screen in android and here I am going to show one of the easiest ways. To create splash screen in android is very easy, you just have to add little bit XML and Java code by creating java and XML file.
Android Example: How to Make/Create a Splash Screen in Android App
Following example shows you to create a simple splash screen in android application programmatically.
Create a New Android Project
Let’s start by creating new android project to make splash screen in android application and game with the following information. No matter which development IDE you are using Android Studio or Eclipse or other.
Application Name: Android Splash Screen Example
Company Domain: com.viralandroid
Package Name: viralandroid.com.androidsplashscreenexample
Minimum SDK Version: Android 2.3 (API Level 9)
XML Layout File
Following is the content of splash_screen_layout.xml and activity_main.xml layout file. splash_screen_layout.xml file is used to show content in splash screen.
Java Activity File
Following are the content of java file to show splash screen in android. SplashScreenActivity.java file have little bit java code to make splash screen. You can change display time duration according to your need.
Following is the complete content of AndroidManifest.xml file. You have to make SplashScreenActivity first launch activity and MainActivity.java secondary activity like below.