Android hdpi/mdpi/ldpi for Values folder?

后端 未结 4 1699
慢半拍i
慢半拍i 2020-12-08 05:23

Android allows us to define hdpi/mdpi/ldpi for the drawable folder in order to account for different sized screens/devices. I was wondering if that same support can be appl

4条回答
  •  猫巷女王i
    2020-12-08 05:47

    Yes, I believe anything in the res/ folder can use "Configuration Qualifiers". So for example, you can have a values-sw600dp-mdpi-land/ folder.

    See "Using Configuration Qualifiers": http://developer.android.com/guide/practices/screens_support.html#qualifiers

    I first noticed this by looking at Google's IOSched app sample code, look at the res folder: https://github.com/google/iosched/tree/master/android/src/main/res

    You'll see that they have "values-sw600dp-land", "values-w400dp" and "values-v17" folders, just to name a few.

提交回复
热议问题