Android Make a Splash Screen in Java

How to make a splash screen in android java – Android splash tutorial

image credit / Pixabay


A splash screen on android or a splash activity is an activity that is shown first when the app is opened.

It is not important to have a splash screen in android but having a splash screen can make your app look professional or standard, it can also be used as a waiting or progress indicator when an app is loading resources data in the background when launching.

This tutorial will help you to make a simple splash screen app.


How does a splash activity work?

As i mentioned above, splash activity is the first activity that is launched when an android app opened, the splash screen can be shown for some seconds to some minutes, or until the background loading of the app is complete, and then the splash Activity will open another activity, for example, the MainActivity – after a set time.

Some splash screen can be shown without an activity, for example – by changing some values in the resources folders, like – Styles.xml, colors, themes etc, but in this tutorial, we will learn to create a splash screen with set time.


So let’s begin the Splash tutorial


Start New android project

In android studio, start a new android project,

android new project
android start new project screenshot


Click Next and choose Empty Activity, click Next

pick activity android new project

Now wait until the project building finishes.


Create a New Activity

Select File > New > Activity > Empty Activity

This will be the Splash Activity of our app

Read:  Download Any Type of Files in Webview Android Studio Java


Rename this activity to SplashActivity and click finish


Next step is editing the android manifest to set the SplashActivity as launcher Activity


Editing the Android Manifest

To load the splash Screen, the first activity (launcher activity) must be the SplashActivity. right now,  the first activity is MainActivity,  we need change the MainActivity to SplashActivity  in order for the Splash screen to be shown.

How to make an activity as launcher activity in android java

To make the SplashActivity as launcher activity, we need change it’s intent filter, to change the intent filter from MainActivity to SplashActivity, refer to this screenshot


Or you can copy this code to your manifest

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""

        <activity android:name=".MainActivity">
        <activity android:name=".SplashActivity">
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />





Next, we need edit the activity_splash.xml, and the files


Editing activity_splash.xml, and the

For the splash screen to show something when launched, we should add something like an imageview or textview or both into it. here we will add just a textview in the activity_splash.xml, so you can see the splash screen in action.

Open the activity_splash.xml and add this text view

        android:text="WELCOME SPLASH"
        tools:layout_editor_absoluteY="341dp" />



Open and enter this code below oncreate method

int SPLASH_TIME_OUT = 700;
       new Handler().postDelayed(new Runnable() {

            * Showing splash screen with a timer. This will be useful when you
            * want to show case your app logo / company

           public void run() {
               // This method will be executed once the timer is over
               // Start your app main activity
               Intent i = new Intent(SplashActivity .this, MainActivity.class);
               // close this activity
       }, SPLASH_TIME_OUT);


Read:  Stop Other Sounds When New Sound is Selected in Android Java

So this is it, if you have any questions, just drop a comment below

, , ,

Post navigation


This site uses Akismet to reduce spam. Learn how your comment data is processed.