Android icons for different displays and screen densities

1.3k views Asked by At

I'm completely confused to the core reading various articles to understand to get my app to fit in to different screen sizes. basically the issue i am having is to have a logo fit in to screens with different screen densities. I've got an image with a resolution of 1616x369 which fits in to Nexus 7" tablet and nexus 10" tablets I guess because they contain hdpi screen densities(which looks perfectly fine). but if I change the preview on eclipse to a 10" wxvga screen size which seem to contain an mdpi resolution the image gets pixelated. I know this is because I haven't specified an image in the mdpi folder for android to pick it up, hence it picks up the image from the hdpi folder. What I don't understand is to what resolutions should I create images for mdpi and ldpi folders based on my original image.

2

There are 2 answers

2
mstrthealias On BEST ANSWER

I'm not exact sure where I got this information from, but I believe there is a link to it within the Iconography | Android Development documentation.

  Density   Launcher    Action Bar  Small/Contextual    Notification
     mdpi   48x48 px    32x32 px    16x16 px            24x24 px
     hdpi   72x72 px    48x48 px    24x24 px            36x36 px
     tvdpi  (use hdpi)  (use hdpi)  (use hdpi)          (use hdpi)
     xhdpi  96x96 px    64x64 px    32x32 px            48x48 px
     xxhdpi 144x144 px  96x96 px    48x48 px            72x72 px
0
jobernas On

The size of the images changes depending what type of image you want.

  • Launcher icons
  • Action bar and tab icons
  • Notification icons
  • Navigation drawer indicator
  • Generic icons

Depending of where you will use your image it changes the size, so have the correct set for what you are using.

Then don't forget to copy the image to the folders ldpi, mdpi and so on. If you do this right,you will not get images pixelated.

Just go to this site http://romannurik.github.io/AndroidAssetStudio/index.html

Click in what type of image you want and generate, select one image for example and download, then you can see the correct sizes. Hope it helps you.