开发者

What size should xhdpi launch icons be?

开发者 https://www.devze.com 2023-02-20 18:55 出处:网络
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 r开发者_如何学Python

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 r开发者_如何学Pythonesoulution. What should I use as the the size of a xhdpi icon?


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.


From tables here and here you can easily calculate all standard sizes for xdpi resources.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号