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?
On Android devices, launcher icons are generally 96×96, 72×72, 48×48, or 36×36 pixels (depending on the device), however Android recommends your starting artboard size should be 864×864 pixels to allow for easier tweaking.
Final size: 512px x 512px. Format: 32-bit PNG.
mdpi
means ~160dpi, xhdpi
means ~320dpi.
So, as an mdpi
icon is 48x48px --> xhdpi
icon is 96x96px
(I give up, upvote as you like)
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.
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.
You should see the official documentation for providing alternate resources for multiple screen sizes.
According to it, mdpi to xhdpi ratio is 1:2.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With