Android Splash Screen Tutorial

Android Splash Screen Tutorial

Android splash screen is important when your app takes time to open, it is not required on all apps but it is need when app needs to make network request or do some processor intensive taks, anyways who cares about that. We are going to implement splash screen that shows on a cold app launch but will be non existent on a hot launch. Let’s code. Create a new Android project and create a new activity SplashActivity.


We are going to do it in following steps

  • Create Android Project.
  • Create SplashActivity.
  • Create a drawable.
  • Create a theme in styles.

Creating Drawable

Create a new file in res/drawable Name it splash_background or something else. I am going to use splash_background in this example

TODO: Line 18 - Replace app_logo with your logo
TODO: Line 8, 9 & 10 - Change colors according to your app logo

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="">
        <shape xmlns:android=""
            android:shape="rectangle" >
                android:startColor="#2f3640" />

            android:src="@drawable/app_logo" />


Creating A New Theme

Navigate to styles.xml and add a new theme for splash activity



    <style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
        <item name="android:windowBackground">@drawable/splash_background</item>


For API level 26 and above add on line 6

<item name="android:windowSplashscreenContent">@drawable/splashscreen</item>

Configure SplashActivity’s Theme

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

Finally Lanuch MainActivity from SplashActivity

public class SplashActivity extends AppCompatActivity {

    protected void onCreate(Bundle savedInstanceState) {

        Intent intent = new Intent(this, MainActivity.class);

Original:  Updated: