Android projects: icon sizes and application configuration with AndroidManifest.xml

An iPhone programmer’s question: I have to design an app for both iPhone and Android platforms. Where’s the info.plist file and what icons and launch images do I have to include in an Android apps? What are the image sizes? I can’t find definitions. Thank you. Answer: Android (Google) provides great documentations. See the links below. The info.plist-like application configuration can be set in the AndroidManifest.xml file. Like info.plist in iPhone projects, the manifest file presents essential information about the app the OS must read before it can run any of your application’s code. For details visit this site. The Android platform makes it easy to provide icons in such a way that they will be displayed properly on any device, but you should create separate icon sets for low-, medium-, and high-density screens. Corresponding assets for different densities must use the same filenames. Icons we use for Android 2.0 and later:
Name Size (pixels) Platform
marketplace_artwork.png 512 x 512 Hires application icon for Android Market.
ic_app.png 72 x 72 Application icon for high-density screens. Place into the res/drawable-hdpi folder. Full size=72×72 pixels, but you should size the content area smaller than the actual bounds to create a consistent visual weight and to allow for shadows. Within this image icon content area: 60×60, so-called Square icon content area: 56×56. The recommended color palette is available here.
ic_app.png 48 x 48 Application icon for medium-density screens in res/drawable-mdpi folder. Within this image -> Icon area: 40×40, Square icon area: 38×38
ic_app.png 36 x 36 Application icon for low-density screens in res/drawable-ldpi folder. Within this image -> Icon area: 30×30, Square icon area: 28×28
ic_menu.png 72 x 72 Menu icons for high-density screens. Copy into the res/drawable-hdpi folder. Transparent menu icons are placed in the options menu shown to users when they press the Menu button. They are drawn in greyscale. For details visit Android site.
ic_menu.png 48 x 48 Menu icon for medium-density screens in res/drawable-mdpi folder.
ic_menu.png 36 x 36 Menu icon for low-density screens in res/drawable-ldpi folder.
ic_statusbar.png 24 (w) x 38 (h) Transparent status bar icons for high-density screens. Place into the res/drawable-hdpi-v9 folder. Content area: 24×24. Older version’s status bar icons should be placed respectively into drawable-hdpi, drawable-mdpi, drawable-ldpi folders. For details visit Android site.
ic_statusbar.png 16 (w) x 25 (h) Transparent status bar icons for medium-density screens in res/drawable-mdpi-v9 folder. Content area: 16×16.
ic_statusbar.png 12 (w) x 19 (h) Transparent status bar icons for low-density screens in res/drawable-ldpi-v9 folder. Content area: 12×12.
ic_tab_xxxx.png 48 x 48 Tab icons are graphical elements used to represent individual tabs in a multi-tab interface. Each tab icon has two states: unselected and selected. xxxx is the actual name for the given tab item. For example: ic_tab_login_selected.png, ic_tab_login_unselected.png. Place them into the res/drawable-hdpi-v5 folder. Content area: 42×42.
ic_tab_xxxx.png 32 x 32 Transparent tab icons for medium-density screens in res/drawable-mdpi-v5 folder. Content area: 28×28.
ic_tab_xxxx.png 24 x 24 Transparent tab icons for low-density screens in res/drawable-ldpi-v5 folder. Content area: 22×22.
ic_dialogbox.png 48 x 48 Transparent dialog icon is shown in pop-up dialog boxes. Place them into the res/drawable-hdpi folder.
ic_dialogbox.png 32 x 32 Transparent dialog icon for medium-density screens in res/drawable-mdpi folder.
ic_dialogbox.png 24 x 24 Transparent dialog icon for low-density screens in res/drawable-ldpi folder.
ic_listview_xxxx.png 48 x 48 Transparent List view icons look like dialog icons with same sizes, but they use an inner shadow effect where the light source is above the object. They are designed to be used only in a ListView objects. Place them into the res/drawable-hdpi folder.
ic_listview_xxxx.png 32 x 32 Transparent list view icon for medium-density screens in res/drawable-mdpi folder.
ic_listview_xxxx.png 24 x 24 Transparent list view icon for low-density screens in res/drawable-ldpi folder.

Android supports a set of resource qualifiers that let you provide size- and density-specific images. The qualifiers for size-specific resources are small, normal, large, and xlarge. Those for density-specific resources are ldpi (low), mdpi (medium), hdpi (high), and xhdpi (extra high). The manifest attributes of android:smallScreens, android:normalScreens, android:largeScreens, and android:xlargeScreens let you specify in the manifest file what generalized screen sizes your application supports. When set to “true”, you are signaling that your application is designed to render properly on that screen size. For a guideline you can use this table to design custom background elements for your Android applications:
ldpi mdpi hdpi xhdi
Small screen QVGA(240×320)
Normal screen WQVGA400 (240×400) WQVGA443 (240×432) HVGA (320×480) WVGA800 (480×800) WVGA854 (480×854)
Large screen WVGA800 hires (480×800) WVGA854 hires (480×854)

As you can see currently a design canvas of 800×800 pixels will work fine for Android apps. Notes: – Applications can provide layouts and images for any of the generalized sizes. Do not need to know the actual physical size or density of the device screen. At run time, Android handles the loading of the correct size or density resources, based on the generalized size or density of the current device and adapts them to the actual pixel map of the screen. To former iPhone programmers: do not use hard-coded pixel values in your code! – Android 2.2+ versions support for extra high density screens (see xhdpi) – Android 2.3+ versions support for extra large screens (see xlarge). – Application icon declaration for ic_app.png in AndroidManifest.xml:
    See android:icon="@drawable/ic_app":
    <application android:icon="@drawable/ic_app">
        ...
    </application>
Links: Android Icon Design Guidelines Icon templates pack for Adobe Photoshop