Android application icon tutorial

Assigning an icon to your Android application just takes a minute.  Actually creating the icon may take a bit longer. 😛

  1. Create a 48×48 PNG and drop it into /res/drawable.  The name of this file is usually “icon.png”.
  2. Open your AndroidManifest.xml.
  3. Right under the root “manifest” node of the XML, you should see the “application” node.  Add this attribute to “application”. (The “icon” in “@drawable/icon” refers to the file name of the icon.)
    android:icon="@drawable/icon"

Your app is now iconned.

To support multiple resolutions, you can create icons of different resolutions and place them in the correct folders.

  • Low density
    • res/drawable-ldpi
    • 36×36 resolution
  • Medium density
    • res/drawable-mdpi
    • 48×48 resolution
  • High density
    • res/drawable-hdpi
    • 72×72 resolution
  • Extra high density
    • res/drawable-xhdpi
    • 96×96 resolution

  1. Anonymous says:

    Awesome post, keep it up

  2. Ernest says:

    Something I was wondering for myself and might help someone

    If you support multiple devices and thus have multiple icon resolutions in multiple folder, the definition in androidmanifest.xml stays the same “@drawable/icon”

  3. mehdi says:

    Thanks, Works fine

  4. Niels says:

    Thanks!

  5. Jordi says:

    The simplicity of great things ;-)) Thanks for saving me of any investigation!

  6. Frank says:

    Question:
    I want to create a custom icon for the home that would launch a website or web app; not a downloaded and installed app. Is there a way to do that?

    Thanks!
    Frank

  7. GaelleMG says:

    Thank you!! Just what I was looking for ;o)

  8. Nazrul Amin says:

    Mate, your a life saver!

  9. debaprasad says:

    ur page has saved ny job today…

  10. uthir says:

    simple and best
    thanks for the post

  11. […] Connor Garvey at January 31st, 2009. Tags: Android, icon, mobile Referenced by: http://www.connorgarvey.com/blog/?p=97 Like this:LikeBe the first to like this […]

  12. oegidio says:

    Excelente, muchas gracias por su conocimiento y tiempo.

  13. Shashank says:

    Thanks that helped me a lot…

  14. lendski says:

    thank you!!!

  15. Soniya says:

    thanks. it helped me.

  16. Kiran says:

    Thank you for the info. Quick and Simple.

  17. arun says:

    Thanks. Really helpful

  18. Vishnu says:

    That’s a nice tip! Thanks!

  19. 72×72 @ /res/drawable-hdpi
    48×48 @ /res/drawable-mdpi
    36×36 @ /res/drawable-ldpi

  20. Ubudog says:

    Thanks for this! Really helped!

  21. Minal says:

    That was great! thanks a lot.

  22. Mukesh says:

    nice article

  23. BigG says:

    Thanks. Nice one 🙂

  24. Thanks for the info! You can save the “icon.png” also to “res/drawable-nodpi”.

  25. Markus Greve says:

    In current Android SDK the icon files are located in /res/drawable-*.
    There are subfolders for the following sizes:

    /res/drawable-hdpi/icon.png ….. 72×72
    /res/drawable-mdpi/icon.png …. 48×48
    /res/drawable-ldpi/icon.png …… 36×36

  26. Flavio says:

    I Im working with a Motorola DEXT with a 1.5 api, and the icon it’s not shown. When I use an emulator with a 1.6 or newer api it works just fine. Is there any additional steps to configure the icon for older apis like the 1.5 I’m working on?

    Thank you very much

    • MrSqueezles says:

      Hi Flavio.

      That’s strange. Newer versions of Android support low, medium and high res icons. Older ones don’t. Be sure to place the icon right in the drawable folder.

  27. NA says:

    Where is the folder on the Droid X? Can it be viewed with Astro?

    • MrSqueezles says:

      The folder is in the application package. I don’t think there’s a way to view it once it’s installed. You may have access if your phone is rooted, but I don’t know about that at all.

  28. MV says:

    This was the most helpful page I found to do this, simple and quick! Thanks!

  29. initdotd says:

    easy to follow. thnx!

  30. m says:

    yea good tip man !

  31. shyamala says:

    Thanks this was really helpful

    • erik says:

      hi
      what about nine-patch images.
      Can they be used instead of the ?

      /res/drawable-hdpi/icon.png ….. 72×72
      /res/drawable-mdpi/icon.png …. 48×48
      /res/drawable-ldpi/icon.png …… 36×36

Leave a Reply