Struct android_manifest::Screen [−][src]
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
<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: ScreenSizeRequired. Specifies the screen size for this screen configuration.
For information about the different screen sizes, see Supporting Multiple Screens.
screen_density: StringRequired. 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
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]Deserialize this value from the given Serde deserializer. Read more
fn serialize_attributes(
&self,
source_attributes: Vec<OwnedAttribute>,
source_namespace: Namespace
) -> Result<(Vec<OwnedAttribute>, Namespace), String>[src]Auto Trait Implementations
impl RefUnwindSafe for Screenimpl UnwindSafe for ScreenBlanket Implementations
Mutably borrows from an owned value. Read more