84 CHAPTER 3: An Introduction to the Android Application Development Platform
Creating a Custom App Launch Icon
One of the first things that any Android application developer wants to learn how to do is to create
their own custom Android application launch icon for the Android OS desktop. This is because this
icon represents the branding for the application, so let’s learn about how to do this here, using the
open source GIMP digital image editing and compositing software.
Creating a Launch Icon for Each Screen Density
The final thing that we are going to do in this chapter is give our application what Android OS terms
a launcher icon. This is your application icon that will show up on your users’ Android devices.
Your users will use this to identify and then launch your Android application. This process is not as
easy as you might imagine, so I am going to show you how to create custom launcher icons for
every resolution density display screen type. We will do this using the GIMP 2.8.10 software that you
installed on your workstations back in Chapter 1.
We will leverage what you have learned so far about defining alternate drawable resources by
creating a custom icon in four different versions targeting medium (using the mdpi or MDPI
constant), high (hdpi or HDPI), extra high (xhdpi or XHDPI), and super high (xxhdpi or XXHDPI)
density resolution screens. It is important to note here that you can write constant values in Android
OS either using all lowercase or all uppercase characters.
We will be modifying (updating or replacing) the appropriate launcher_ic.png files into their correct
alternate drawable density resolution folders. These folders were provided by the New Android
Application Project series of dialogs we encountered in the first part of this chapter.
By using these alternate drawable resource folders, we can assure that Android will automatically
find and use the correct launcher icon image asset resource for mainstream types of Android device
screen size and density:
/res/drawable-mdpi for normal size, Medium Density in Dots Per Inch
(MDPI) displays
/res/drawable-hdpi for large size, High Density in Dots Per Inch (HDPI)
display screens
/res/drawable-xhdpi for extra large size, Extra High Density Dot Per Inch
(XHDPI) screens
/res/drawable-xxhdpi for super large, Extra Extra High Density Dot Per
Inch (XXHDPI)