Struct android_manifest::CompatibleScreens
source · pub struct CompatibleScreens {
pub screen: Vec<Screen>,
}
Expand 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
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 and xlarge 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.
XML Syntax
<compatible-screens>
<screen android:screenSize=["small" | "normal" | "large" | "xlarge"]
android:screenDensity=["ldpi" | "mdpi" | "hdpi" | "xhdpi"
| "280" | "360" | "420" | "480" | "560" ] />
...
</compatible-screens>
Contained in
Introduced in
API Level 9
Fields§
§screen: Vec<Screen>
Trait Implementations§
source§impl Clone for CompatibleScreens
impl Clone for CompatibleScreens
source§fn clone(&self) -> CompatibleScreens
fn clone(&self) -> CompatibleScreens
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CompatibleScreens
impl Debug for CompatibleScreens
source§impl<'de> Deserialize<'de> for CompatibleScreens
impl<'de> Deserialize<'de> for CompatibleScreens
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl PartialEq<CompatibleScreens> for CompatibleScreens
impl PartialEq<CompatibleScreens> for CompatibleScreens
source§fn eq(&self, other: &CompatibleScreens) -> bool
fn eq(&self, other: &CompatibleScreens) -> bool
self
and other
values to be equal, and is used
by ==
.