Skip to content Skip to sidebar Skip to footer

Android Images, Density, And Screen Pixels

I am confused by Android documentation about this questions so I will ask them here: I have HTC Desire mobile on this link I see that it has pixels 480×800 and Density 252 When I

Solution 1:

  1. Android puts devices into buckets: ldpi, mdpi, hdpi, xhdpi. The Desire falls into the hdpi bucket which is 240dpi. As you can see, 252dpi is very close to 240dpi.
  2. The default mdpi is 160dpi. When getting resources, unless you specify otherwise it will try to scale images from the original density to the new one. 160:240::400:600::113:170. You probably put your image in the drawable folder.
  3. This size is fine, but you should put it in the drawable-hdpi folder if it's for hdpi devices. (You should probably also put a mdpi version sized appropriately in the drawable-mdpi folder for mdpi devices too).

Read through this document for details on supporting multiple screens and information on densities.


Post a Comment for "Android Images, Density, And Screen Pixels"