android - How to findout the best match

ⅰ亾dé卋堺 提交于 2019-12-13 21:32:52

问题


My device configuration is large-mdpi. But in my app, i have the images only for small-ldpi,normal-mdpi. Here how to findout the best match for this. i think i collects the images from the small-ldpi because our precedence contains small as first.please see this link. is it right? please can anybody help me.

thanks.


回答1:


Don't put size qualifiers on your drawable folders. Just make drawable-ldpi and drawable-mdpi.

Edit: Maybe I answered too quickly. Do you actually have different images for small and large screens at the same density? In that case, my advice is to always have a folder with a more general qualification. It's kind of like default in a switch statement.

In your instance, I'd go with:

drawable-ldpi
drawable-mdpi
drawable-large-ldpi


来源:https://stackoverflow.com/questions/9630639/android-how-to-findout-the-best-match

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!