Home Coding Android Coding How to Create a Splash Screen in Android Studio

How to Create a Splash Screen in Android Studio

0

splash_appdosh

Many developers use a splash screen to display a creative design with logo while the app opens. Unfortunately for Android fans, this OS doesn’t have any built-in tool unlike Xcode for displaying splash screens. In this tutorial, we are going to explore the steps that involve making a splash screen for an Android App.

Steps on Creating a Splash Screen in Android Studio

1.Open a New Android Studio Project, name it, and select the default minimum SDK.

2

2. Select Empty Activity and create a layout with the default name.

2

3. Let’s start by creating a new layout file. Right Click on Layout (App>Res>Layout) and select New>Layout Resource File. I named as splashscreen.xml.

3

4. Locate the drawable folder. Paste the image you plan on using as splash screen there. Ideally, it should be saved as .png in 800 x 1280 pixels. Name it using small cap letters only. You can use underscores but stay away from any special symbols. I named mine splashscreen.

4

5. Open splashscreen.xml and insert the following code:

6. Next we need to create a new activity that will be shown ahead of the main activity. We’re going to do that by creating a new java class. Right-click on your package name, select New>Java Class. Name it SplashDosh.

4

5

7. Type the following code in SplashDosh.java:

8. In order to wrap it up, we need to include SplashDosh Activity into Android Manifest. Open AndroidManifest.xml and insert the code below:

9. Run your Project and see the splash screen.

78

Denis Madroane App junkie, Android developer, proud Freelancer. Passionate about app development and blogging, updated with the new stuff. Likes to think that he's versed in app re-skinning, content writing and social media.

LEAVE YOUR COMMENT

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

Powered by WordPress