Struct android_manifest::CompatibleScreens[][src]

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 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 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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.