开发者

Android: Milestone and Galaxy have same resolution / dpi qualifiers for drawable, how to differentiate?

I'm developing an application that I'm testing on both the Motorola Milestone and the Galaxy Tab 10.1. My issue is that I'm trying to get my icons to scale properly by attaching qualifiers after the drawable folder name, and want the Milestone to use one set of icons, and the Tab to use another, but haven't found a unique combination to target either phone.

i.e. if I set my drawable folder to drawable-hdpi the Milestone and Tab both use the images in that fol开发者_高级运维der.


Try the screen size modifiers. e.g. have two drawable directories:

drawable-normal
drawable-xlarge

See Table 2 in the documentation for more qualifiers that you can try.


drawable-hdpi will target the Milestone (DPI = 240)

drawable-mdpi will target the Galaxy Tab 10.1 (DPI = 149)

You are mistaken that the Tab and Milestone are in the same DPI bucket.

For more information on how tablets and phones can be handled with res folders, see this android developers blog post.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜