compatible-screens
2016-04-06 12:20
405 查看
SYNTAX:
CONTAINED IN:
DESCRIPTION:
Specifies each screen configuration with which the application is compatible. Only one instance of the
specifies a specific screen size-density combination with which the application is compatible.
The Android system does not read the
services (such as Google Play) to better understand the application's compatibility with specific screen configurations and enable filtering for users. Any screen configuration that is not declared in this element is a screen with which the application
is not compatible. Thus, external services (such as Google Play) should not provide the application to devices with such screens.
Caution: Normally, you should not use this manifest element. Using this element can dramatically reduce the potential user base for your application, by not allowing users to install your application if they have a device with
a screen configuration that you have not listed. You should use it only as a last resort, when the application absolutely does not work with specific screen configurations. Instead of using this element, you should follow the guide to Supporting
Multiple Screens to provide scalable support for multiple screens using alternative layouts and bitmaps for different screen sizes and densities.
If you want to set only a minimum screen size for your your application, then you should use the
For example, if you want your application to be available only for large andxlarge screen devices, the
allows you to declare that your application does not support small and normal screen sizes. External services (such as Google Play) will filter your application accordingly. You can also use the
to declare whether the system should resize your application for different screen sizes.
Also see the Filters on Google Play document for more information about how
Google Play filters applications using this and other manifest elements.
CHILD ELEMENTS:
At least one instance of this element must be placed inside the
(if you do not declare both attributes, then the element is ignored).
attributes:
Accepted values:
For information about the different screen sizes, see Supporting
Multiple Screens.
Accepted values:
For information about the different screen densities, see Supporting
Multiple Screens.
EXAMPLE
If your application is compatible with only small and normal screens, regardless of screen density, then you must specify eight different
different density configurations. You must declare each one of these; any combination of size and density that you do notspecify is considered a screen configuration with which your application is not compatible. Here's what the manifest
entry looks like if your application is compatible with only small and normal screens:
INTRODUCED IN:
API Level 9
SEE ALSO:
Supporting Multiple Screens
Filters on Google Play
句法:
包含在:
描述:
指定每个屏幕配置与该应用程序是兼容的。只有一个实例
Android系统不会读取
注意:通常情况下,你不应该使用这个清单元素。使用该元素可以通过不允许用户,如果他们有,你有没有列出的屏幕配置的设备安装应用程序极大地降低了潜在用户群为您的应用程序。你应该使用它只能作为最后的手段,当应用程序绝对不会与具体的屏幕配置工作。而不是使用这个元素,应该遵循的指导支持多种屏幕提供使用替代布局和位图不同的屏幕大小和密度的多个屏幕可扩展的支持。
如果你只想设置一个最小的屏幕尺寸为您的应用程序,那么你应该使用
也看到了在谷歌的过滤器播放 的文件有关谷歌Play如何使用此过滤器的应用程序和其他清单元素的更多信息。
子元素:
该元素的至少一个实例必须放在内
属性:
接受的值:
有关不同屏幕尺寸的信息,请参阅支持多种屏幕。
接受的值:
有关不同的屏幕密度信息,请参阅支持多种屏幕。
例
如果应用程序是只小,正常的屏幕兼容,无论屏幕密度,那么你必须指定八个不同的
介绍了:
API等级9
也可以看看:
支持多种屏幕
在谷歌Play筛选器
<compatible-screens> <screen android:screenSize=["small" | "normal" | "large" | "xlarge"] android:screenDensity=["ldpi" | "mdpi" | "hdpi" | "xhdpi" | "280" | "360" | "420" | "480" | "560" ] /> ... </compatible-screens>
CONTAINED IN:
<manifest>
DESCRIPTION:
Specifies each screen configuration with which the application is compatible. Only one instance of the
<compatible-screens>element is allowed in the manifest, but it can contain multiple
<screen>elements. Each
<screen>element
specifies a specific screen size-density combination with which the application is compatible.
The Android system does not read the
<compatible-screens>manifest element (neither at install-time nor at runtime). This element is informational only and may be used by external
services (such as Google Play) to better understand the application's compatibility with specific screen configurations and enable filtering for users. Any screen configuration that is not declared in this element is a screen with which the application
is not compatible. Thus, external services (such as Google Play) should not provide the application to devices with such screens.
Caution: Normally, you should not use this manifest element. Using this element can dramatically reduce the potential user base for your application, by not allowing users to install your application if they have a device with
a screen configuration that you have not listed. You should use it only as a last resort, when the application absolutely does not work with specific screen configurations. Instead of using this element, you should follow the guide to Supporting
Multiple Screens to provide scalable support for multiple screens using alternative layouts and bitmaps for different screen sizes and densities.
If you want to set only a minimum screen size for your your application, then you should use the
<supports-screens>element.
For example, if you want your application to be available only for large andxlarge screen devices, the
<supports-screens>element
allows you to declare that your application does not support small and normal screen sizes. External services (such as Google Play) will filter your application accordingly. You can also use the
<supports-screens>element
to declare whether the system should resize your application for different screen sizes.
Also see the Filters on Google Play document for more information about how
Google Play filters applications using this and other manifest elements.
CHILD ELEMENTS:
<screen>Specifies a single screen configuration with which the application is compatible.
At least one instance of this element must be placed inside the
<compatible-screens>element. This element must include both the
android:screenSizeand
android:screenDensityattributes
(if you do not declare both attributes, then the element is ignored).
attributes:
android:screenSizeRequired. Specifies the screen size for this screen configuration.
Accepted values:
small
normal
large
xlarge
For information about the different screen sizes, see Supporting
Multiple Screens.
android:screenDensityRequired. Specifies the screen density for this screen configuration.
Accepted values:
"ldpi"(approximately 120 dpi)
"mdpi"(approximately 160 dpi)
"hdpi"(approximately 240 dpi)
"xhdpi"(approximately 320 dpi)
"280"
"360"
"420"
"480"
"560"
For information about the different screen densities, see Supporting
Multiple Screens.
EXAMPLE
If your application is compatible with only small and normal screens, regardless of screen density, then you must specify eight different
<screen>elements, because each screen size has four
different density configurations. You must declare each one of these; any combination of size and density that you do notspecify is considered a screen configuration with which your application is not compatible. Here's what the manifest
entry looks like if your application is compatible with only small and normal screens:
<manifest ... > ... <compatible-screens> <!-- all small size screens --> <screen android:screenSize="small" android:screenDensity="ldpi" /> <screen android:screenSize="small" android:screenDensity="mdpi" /> <screen android:screenSize="small" android:screenDensity="hdpi" /> <screen android:screenSize="small" android:screenDensity="xhdpi" /> <!-- all normal size screens --> <screen android:screenSize="normal" android:screenDensity="ldpi" /> <screen android:screenSize="normal" android:screenDensity="mdpi" /> <screen android:screenSize="normal" android:screenDensity="hdpi" /> <screen android:screenSize="normal" android:screenDensity="xhdpi" /> </compatible-screens> <application ... > ... <application> </manifest>
INTRODUCED IN:
API Level 9
SEE ALSO:
Supporting Multiple Screens
Filters on Google Play
句法:
< compatible-screens > < screen android: screenSize = ["small" | "normal" | "large" | "xlarge" ] android: screenDensity = ["ldpi" | "mdpi" | "hdpi" | "xhdpi" | "280" | "360" | "420" | "480" | "560" ] /> ... </compatible-screens>
包含在:
<清单>
描述:
指定每个屏幕配置与该应用程序是兼容的。只有一个实例
<兼容的屏幕>元素被允许在清单中,但它可以包含多个
<屏幕>元素。每个
<屏幕>元素指定特定的屏幕尺寸密度组合与该应用程序是兼容的。
Android系统不会读取
<兼容的屏幕>清单元素(既不在安装时也没有在运行时)。此元素仅供参考,可以由外部服务中使用(如谷歌播放),以更好地了解应用程序的特定屏幕配置的兼容性,使过滤用户。即任何屏幕配置 并不在此元素声明的是与该应用程序是一个屏幕不 兼容。因此,外部服务(如谷歌播放)不应该提供应用程序能与这样屏幕的设备。
注意:通常情况下,你不应该使用这个清单元素。使用该元素可以通过不允许用户,如果他们有,你有没有列出的屏幕配置的设备安装应用程序极大地降低了潜在用户群为您的应用程序。你应该使用它只能作为最后的手段,当应用程序绝对不会与具体的屏幕配置工作。而不是使用这个元素,应该遵循的指导支持多种屏幕提供使用替代布局和位图不同的屏幕大小和密度的多个屏幕可扩展的支持。
如果你只想设置一个最小的屏幕尺寸为您的应用程序,那么你应该使用
<支持的屏幕>元素。例如,如果你希望你的应用程序只为提供大和XLARGE屏幕设备中,
<支持的屏幕>元素允许你声明你的应用程序不支持小型和正常的屏幕尺寸。外部服务(如谷歌播放)将相应地过滤你的应用程序。您也可以使用
<支持的屏幕>元素申报制度是否应调整您针对不同屏幕尺寸的应用。
也看到了在谷歌的过滤器播放 的文件有关谷歌Play如何使用此过滤器的应用程序和其他清单元素的更多信息。
子元素:
<屏幕>指定单个屏幕配置与应用程序兼容。
该元素的至少一个实例必须放在内
<兼容屏>元素。该元素必须包括的
Android版 本:屏幕尺寸和
Android的:screenDensity属性(如果你没有声明这两个属性,则该元素被忽略)。
属性:
机器人:屏幕尺寸必需。指定该屏幕配置的屏幕尺寸。
接受的值:
小
正常
大
XLARGE
有关不同屏幕尺寸的信息,请参阅支持多种屏幕。
机器人:screenDensity必需。指定该屏幕配置的屏幕密度。
接受的值:
“LDPI”(约120 DPI)
“MDPI”(约160 DPI)
“华电国际”(约240 DPI)
“xhdpi”(约320 DPI)
“280”
“360”
“420”
“480”
“560”
有关不同的屏幕密度信息,请参阅支持多种屏幕。
例
如果应用程序是只小,正常的屏幕兼容,无论屏幕密度,那么你必须指定八个不同的
<屏幕>元素,因为每个屏幕尺寸有四个不同的密度配置。您必须声明,这些每一个; 大小和你的密度的任意组合没有指定被认为是屏幕配置与您的应用程序不兼容。这里的清单条目的样子,如果你的应用程序只小,标准屏幕兼容:
<清单... > ... <兼容的屏幕> <! -所有的小尺寸屏幕 一切正常尺寸屏幕
介绍了:
API等级9
也可以看看:
支持多种屏幕
在谷歌Play筛选器
相关文章推荐
- Android Manifest 用法
- 什么是 GraphQL?
- Spark RDD API详解(一) Map和Reduce
- Spring Boot 开发微服务
- lwn拾遗:[sn3218 led drivers]-api解释-1
- XML 与 JSON 优劣对比
- ActionScript 3.0 编程体验
- As3.0 xml + Loader应用代码
- 再谈Jquery Ajax方法传递到action(补充)
- 一个小型js框架myJSFrame附API使用帮助
- 网马生成器 MS Internet Explorer XML Parsing Buffer Overflow Exploit (vista) 0day
- ext读取两种结构的xml的代码
- 详细分析交换机、路由器、集线器的区别和联系
- PowerShell打开或关闭光驱
- 批处理的api WMIC学习体会有感第1/2页
- 批处理 API实现文件下载的代码第1/2页
- Lua教程(十七):C API简介
- C#针对xml基本操作及保存配置文件应用实例
- Ruby程序中创建和解析XML文件的方法