Android的华电国际/ MDPI / LDPI的价值观文件夹?
Android的允许我们定义华电国际/ MDPI / LDPI的绘制文件夹,以便考虑不同的屏幕尺寸/设备。我在想,如果同样的支持,可以适用的价值观文件夹(甚至是布局文件夹)?原因是,我通常会定义一个sizes.xml文件,该文件认为我申请利润率和补白标准DP的大小。我也做了相同的SP大小的文本。我想基于手机DPI调节这些值。
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 applied for the Values folder (or even the layout folder)? Reason being, I typically define a "sizes.xml" file which holds standard dp sizes that I apply to margins and paddings. I also do the same for sp sizes for text. I'd like to adjust those values based on the phones dpi.
是的,我相信 RES /
文件夹中任何事情都有可能使用配置预选赛。因此,例如,你可以有一个价值观sw600dp-MDPI陆/
文件夹。
Yes, I believe anything in the res/
folder can use "Configuration Qualifiers". So for example, you can have a values-sw600dp-mdpi-land/
folder.
请参阅使用配置限定符: http://developer.android.com/guide/practices/screens_support.html#qualifiers
See "Using Configuration Qualifiers": http://developer.android.com/guide/practices/screens_support.html#qualifiers
我第一次注意到这个通过查看谷歌的IOSched应用程序示例code,看看 RES
文件夹:
https://github.com/google/iosched/tree/master/android/src/main/res
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
您会看到,他们有价值观sw600dp陆,价值观w400dp和价值观V17文件夹,只是仅举几例。
You'll see that they have "values-sw600dp-land", "values-w400dp" and "values-v17" folders, just to name a few.