Domanda

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 folder.

È stato utile?

Soluzione

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.

Altri suggerimenti

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top