I've created a \res\drawable-xhdpi resource folder to prepare for the hi-res devices, but the developer.android.com site doesn't provide guidelines for the icon sizes for this resoulution. What should I use as the the size of a xhdpi icon?
8 Answers
mdpi
means ~160dpi, xhdpi
means ~320dpi.
So, as an mdpi
icon is 48x48px --> xhdpi
icon is 96x96px
(I give up, upvote as you like)
-
2Hackbod has confirmed this. It is 2x the mdpi size. This is clearly missing in the documentation.– JanuszCommented Jul 15, 2011 at 11:13
-
2
-
Android xxhdpi icon = 76 mm , but not all devices are exactly accurate to the density bucket. xxhdpi = 480 dpi -> 189 dpcm hence 144 px -> 76mm And iPhone icons are 89 mm Retina Iphone 5 = 326 dpi -> 128 dpcm hence 114 px -> 89mm– TaikoCommented Jun 25, 2014 at 5:34
follow this ratio 2:3:4:6:8 ratio for mdpi:hdpi:xhdpi:xxhdpi:xxxhdpi
I usually create my assets at the highest level I'm supporting and start downsizing them, making any pixel level hand crafted adjustments as I see the need.
-
yeah .. just design for xhdpi, then start resizing downwards for best output. or simply use Android Asset Studio. But it gives very limited choices, in which case you wanna go custom. Then this figure will help you :)– kishu27Commented Jan 28, 2013 at 3:25
-
1It's easier to design for xhdpi*3, better scaling ratio ;) Commented Mar 15, 2013 at 14:56
-
2agreed. however, best designers in the industry tend to rebuild the icons for each size instead of just scaling because pixels are lost when you scale down. they rebuild them.– kishu27Commented Mar 15, 2013 at 20:38
To create alternative bitmap drawables for different densities, you should follow the 3:4:6:8:12:16 scaling ratio between the six generalized densities. For example, if you have a bitmap drawable that's 48x48 pixels for medium-density screens, all the different sizes should be:
36x36 (0.75x) for low-density
48x48 (1.0x baseline) for medium-density
72x72 (1.5x) for high-density
96x96 (2.0x) for extra-high-density
180x180 (3.0x) for extra-extra-high-density
192x192 (4.0x) for extra-extra-extra-high-density (launcher icon only; see note above)
For more information about designing icons, see the Icon Design Guidelines, which includes size information for various bitmap drawables, such as launcher icons, menu icons, status bar icons, tab icons, and more.
-
1you have a mistake : 144x144 (3.0x) for extra-extra-high-density Commented Jun 11, 2015 at 11:21
You should see the official documentation for providing alternate resources for multiple screen sizes.
According to it, mdpi to xhdpi ratio is 1:2.
This calculator will help you in finding out which dimensions are needed:
http://labs.skinkers.com/content/android_dp_px_calculator/
It works 2 ways (from DPI to PX and vice versa).
The rule 3:4:6:8 interpret like this:
4 = MDPI
If MDPI equals X px, then
LDPI = MDPI x 0.75 HDPI = MDPI * 1.5 XHDPI = MDPI * 2
now xxhdpi phones coming, 144x144px in drawable-nodpi folder will suit for every phones