pub struct Screen {
    pub screen_size: ScreenSize,
    pub screen_density: String,
}
Expand description

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:screenSize and android:screenDensity attributes (if you do not declare both attributes, then the element is ignored).

XML Example

If your application is compatible with only small and normal screens, regardless of screen density, then you must specify twelve different elements, because each screen size has six different density configurations. You must declare each one of these; any combination of size and density that you do not specify 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" />
       <screen android:screenSize="small" android:screenDensity="xxhdpi" />
       <screen android:screenSize="small" android:screenDensity="xxxhdpi" />
       <!-- 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" />
       <screen android:screenSize="normal" android:screenDensity="xxhdpi" />
       <screen android:screenSize="normal" android:screenDensity="xxxhdpi" />
    </compatible-screens>
    <application ... >
       ...
    <application>
</manifest>

Contained in: <compatible-screens>

Fields§

§screen_size: ScreenSize

Required. Specifies the screen size for this screen configuration.

For information about the different screen sizes, see Supporting Multiple Screens.

§screen_density: String

Required. Specifies the screen density for this screen configuration.

For information about the different screen densities, see Supporting Multiple Screens.

Accepted values:

  • “ldpi” (approximately 120 dpi)
  • “mdpi” (approximately 160 dpi)
  • “hdpi” (approximately 240 dpi)
  • “xhdpi” (approximately 320 dpi)
  • “280”
  • “360”
  • “420”
  • “480”
  • “560”

Trait Implementations§

source§

impl Clone for Screen

source§

fn clone(&self) -> Screen

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Screen

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Screen

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq<Screen> for Screen

source§

fn eq(&self, other: &Screen) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Screen

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl YaDeserialize for Screen

source§

fn deserialize<R: Read>(reader: &mut Deserializer<R>) -> Result<Self, String>

source§

impl YaSerialize for Screen

source§

fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>

source§

fn serialize_attributes( &self, source_attributes: Vec<OwnedAttribute>, source_namespace: Namespace ) -> Result<(Vec<OwnedAttribute>, Namespace), String>

source§

impl Eq for Screen

source§

impl StructuralEq for Screen

source§

impl StructuralPartialEq for Screen

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,