android 屏幕尺寸,values-v11,values-v14

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12221705/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 10:04:19  来源:igfitidea点击:

android screen size,values-v11,values-v14

androidandroid-resourcesscreen-size

提问by LK Yeung

I found several valuesfolders in my resfolder:

values在我的res文件夹中找到了几个文件夹:

xlarge screens are at least 960dp x 720dp
large screens are at least 640dp x 480dp
normal screens are at least 470dp x 320dp
small screens are at least 426dp x 320dp  
res/values-normal/ ==    res/values-v11/ ???
res/values-xlarge/ ==   res/values-v14/  ???

Am I right? Or do I need to create another folder called values-xlarge, values-normal?

我对吗?还是我需要创建另一个名为values-xlarge, 的文件夹values-normal

回答by xagema

values-v11is the values of the API version 11, and values-v14is the values of the API version 14.

values-v11是 API 版本 11values-v14的值, 是 API 版本 14 的值。

It's worth indicating that i.e. values-v11will be used for API 11 andhigher, unless there's another folder that got higher version. For example if you got values-v11and values-v14folders, then values-v11and will be used on APIs 11, 12, 13 but on API 14 and higher, content of values-v14will be used

值得指出的是 ievalues-v11将用于 API 11更高版本,除非有另一个获得更高版本的文件夹。例如,如果你有values-v11values-v14文件夹,然后values-v11,将在API的11,12,13,但在API 14和更高,内容使用values-v14将被使用

回答by Marcin Orlowski

No, this "equation" is not correct:

不,这个“方程”是不正确的:

res/values-normal/ == res/values-v11/ ???
res/values-xlarge/ == res/values-v14/ ???

xlargedefines screen size (so these values will be used on device with display matching xlargerequirements) while v14determines API version (Ice Cream Sandwitch - see here). It is not guaranteed (or even assumed) that every xlargedevices have to be running v14API or that every ICS device features xlargescreen.

xlarge定义屏幕大小(因此这些值将在具有显示匹配xlarge要求的设备上使用)同时v14确定 API 版本(Ice Cream Sandwitch -请参阅此处)。不能保证(甚至假设)每个xlarge设备都必须运行v14API 或每个 ICS 设备都具有xlarge屏幕功能。

回答by userM1433372

v11 in values-v11 is a qualifier for Android sdk version v11.

values-v11 中的 v11 是 Android sdk 版本 v11 的限定符。

Take a look at http://developer.android.com/guide/topics/resources/providing-resources.htmlfor a detailed description about how Android supports resources for different sdk versions, screen, languages or other device configurations.

请查看http://developer.android.com/guide/topics/resources/providing-resources.html,详细了解 Android 如何支持不同 sdk 版本、屏幕、语言或其他设备配置的资源。

http://developer.android.com/guide/practices/screens_support.htmlcontains a more detailed explanation about supporting multiple screen dimensions.

http://developer.android.com/guide/practices/screens_support.html包含有关支持多屏幕尺寸的更详细说明。