简体   繁体   中英

Difference between drawable and drawable-mdpi

As I understand it, the default DPI setting for Android is equivalent to MDPI. Is there any reason to have both drawable and drawable-mdpi folders, or would it work the same if I just put them in drawable?

The drawable/ folder is the most general folder. Mdpi res devices will use the drawable-mdpi directory first, hdpi devices will look in drawable-hdpi, etc.

http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources

Android will look for the most specific resource it can get before falling back to the drawable/ folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM