Our apps may run on devices with different screen sizes and densities so we’ll need different size icons.
Android has created 5 buckets for the different screen densities:
Screen density |
Required Icon sizes |
folder |
Medium |
48 x 48 |
drawable-mdpi |
High |
72 x 72 |
drawable-hdpi |
Extra High |
96 x 96 |
drawable-xhdpi |
Extra-Extra-High |
144 x 144 |
drawable-xxhdpi |
Extra-Extra-Extra High |
192 x 192 |
drawable-xxxhdpi |
There is also a low density bucket but there's no need to worry about that as Android will scale down the high density icon for this.
Use the 2:3:4:6:8 ratio to get the alternative launcher icons
The launcher icon must be 48 x 48 dp. To ensure this size on all devices we need to have alternative size icons. You can use the 2:3:4:6:8 ratio to get these sizes or simply refer to the above table.
For example, our medium density image is 48 x 48. We calculate the size of the high density image using the ratio 2:3. So 48 x 3 = 144 and 144/2 = 72. Use the other ratios to calculate the sizes of the remaining images.
Do you need a hi res Google Play image?
If you’re going to publish your app on Google Play, then you’re going to need a high res 512 x 512 pixel image as well.
Tools you'll need to create your launcher icons
Gimp, Inkscape or alternative image editing software, and Android Asset Studio
Let’s get to work creating great launcher icons
Let's say that I have an app for birdwatchers that I want to publish. I need launcher icons and a 512 x 512 icon for Google Play.
I used Photoshop to do the image editing.
1. Get your picture
I want an image of a bird to appear on the icon. I search the internet for a free image with no licence constraints and find this one on Pixabay.com:
Original image
Unfortunately it’s in jpeg format. Ideally I would have liked a Vector graphic, oh well…
Ideally you should do all your image scaling using Vector images as these will scale without losing any image quality. You can then convert them to jpeg or png after the resizing.
2. Get your start size
As I need a 512 x 512 image for Google Play, I crop the image to that size:
Cropped Image
3. Adding text and rounding the corners
I decide not to include any text but I do want rounded corners:
Rounded corners image
Enter Asset Studio.
4. Upload your image to Asset Studio
Android Asset Studio is a free online tool that you can use to create all your launcher icons. It’s very easy. Simply load your final image into the tool and choose your settings:
You can see the effects in real-time:
You can also get your 512 x 512 image for Google Play!
5. Downlaod your launcher icon files
Once you’re satisfied, download the zip file (it automatically downloads your hi res web image too!).
And there you are, everything is done for you. Unzip the file and open up the res folder and there are all your drawable folders complete with their correctly named and scaled launcher icons:
Just copy-and-paste them into your apps res folder.