Create A Splash Screen Following the Branded Material Design Pattern

How to do a branded splash screen utilizing the Android material design pattern:

https://www.google.com/design/spec/patterns/launch-screens.html#launch-screens-placeholder-ui

Step 1:

Create a drawable resource file in the drawable folder. (Right click the drawable folder, select New -> Drawable Resource File). Delete all but the first line of auto-generated code. Add the following code to the drawable resource and save as branded_logo.xml. Change the image name to match your image.

NOTE: This example assumes that I have an image in my drawable folder called led_zeppelin.

 



Step 2:

Open the styles.xml file in the res/values folder and add the following style tag.

styles.xml

 

Step 3:

In the MainActivity.java file (or whichever java file is behind the launcher activity, add the line of code.

MainActivity

Step 4:

Add the style attribute to the activity in the manifest.

android_manifest.xml

Step 5:

The result:

Share:

Facebooktwittergoogle_plusredditpinterestlinkedinmail

profcodegirl