Issue
I did some google search and look at documentation but i didn't find my answer. Suppose i have an image and two version of it. One for hdpi devices and the other for ldpi devices . Is it important to have two folder with exact name drawable-hdpi and drawable-ldpi ? If yes is this the pattern to use drawable-amountofpixel ? If no how android knows which folder to use when app is running on a hdpi device ?
Solution
Is it important to have two folder with exact name drawable-hdpi and drawable-ldpi ?
Yes. More accurately, it is important to have two directories that start with drawable and contain -hdpi and -ldpi as appropriate. It is possible to have more complex scenarios (e.g., drawable-sw800-hdpi).
If yes is this the pattern to use drawable-amountofpixel ?
The pattern is to use the density qualifiers that are covered in the documentation. See:
The "screen density (pixel)" row in the roster of resource set qualifiers
Answered By - CommonsWare
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.