Struct android_manifest::Screen
source · 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: 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”