How to create Splash Screen in Android

How to create Splash Screen in Android

 Deepanshu Rajora

View (1818)

Android splash screen are normally used to show user some kind of progress before the app loads completely. Splash screen is an activity that will show for set time when your app is starting and after set time period redirect to application main screen.
Some people use splash screen just to show case their app / company logo for a couple of second. In this article, we are going to learn how to implement splash screen in your android application.

Create New Android Project

1. Create a new project and fill the required details File ⇒ New ⇒ Android Project

2. Open splashscreen.xml (res/layout) make screen to behave like your splash screen by placing company logo and background color.  


<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android=""
    android:layout_width="fill_parent" android:layout_height="fill_parent"
    android:background="#2185c5" android:orientation="vertical"

    <ImageView android:src="@drawable/logo" android:id="@+id/imageView1"
        android:layout_width="match_parent" android:layout_height="wrap_content">

    <TextView android:id="@+id/textView1" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:layout_gravity="center">



3. Now open Activity class, create object of Handler class and callpostDelayed() method to show splash screen for 5 seconds. After wait of 5 seconds, we will redirect user to HomeScreen and will finish current splash screen.


package com.splashscreen.geeksdemy;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
public class SplashScreen extends Activity {
    // Constant Value for Splash Screen time visibility
    private static int SPLASH_SCREEN_TIME = 5000;
    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {
        // Create object of Handler class and call method postDelayed to make
        // Splash Screen visible for SPLASH_SCREEN_TIME
        new Handler().postDelayed(new Runnable() {
            public void run() {
                // This is method will be executed when SPLASH_SCREEN_TIME is
                // over, Now you can call your Home Screen
                Intent iHomeScreen = new Intent(getApplicationContext(),
                // Finish Current Splash Screen, as it should be visible only
                // once when application start


4. Make sure you have created Activity class and respective xml file for GUI.

5. Now execute Application.


Points to Remember

  • In Android, No Built in mechanism available for Splash screen
  • Use Handler or Thread class to make Splash Screen visible for few seconds.
  • postDelayed() used to called runnable after specified amount of time
  • Don’t forget to finish()  splash screen, once you redirect to Home Screen.

 If you like this Article and find this helpful, don't forget to like and share with your friends!


About the author

Most Read

Watch Security Cams in the open using Google dorks

Are you aware that there is no such thing on the internet as, “Hiding in...

The new kid in the block: Android Noughat

Google has been following a similar pattern with its Android naming process....

Top 10 reasons why you should learn Java

If you're a programmer now, or you want to become one, you've probably...

12 Creative Ways to Promote Your App for Free

Most people think that successful mobile apps get magically downloaded millions...

What makes for a successful mobile App?

Want to start making money from your Android Apps. Here, we have populated a...
Register Here
By signing up , you agree to our Terms of Service and Privacy Policy.
 Login With
Log In Here
Remember me Forgot password?
 Login With
Reset Password

Confirmation Message

Yes No
Forgot Password
Do you want to Login ?