Assigning an icon to your Android application just takes a minute. Actually creating the icon may take a bit longer.
- Create a 48×48 PNG and drop it into /res/drawable. The name of this file is usually “icon.png”.
- Open your AndroidManifest.xml.
- 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
ldpi (120 dpi)(Low density screen) | mdpi (160 dpi)(Medium density screen) | hdpi (240 dpi)(High density screen) | xhdpi (320 dpi)(Extra-high density screen) | |
---|---|---|---|---|
Launcher Icon Size | 36 x 36 px | 48 x 48 px | 72 x 72 px | 96 x 96 px |
Application Icons in Android Market
If you are publishing your application on Android Market, you will also need to provide a 512 x 512 pixel, high-resolution application icon in the developer console at upload time. This icon will be used in various locations in Android Market and does not replace your launcher icon.
Comments
Post a Comment