Struct android_manifest::UsesConfiguration
source · pub struct UsesConfiguration {
pub req_five_way_nav: Option<VarOrBool>,
pub req_hard_keyboard: Option<VarOrBool>,
pub req_keyboard_type: Option<ReqKeyboardType>,
pub req_navigation: Option<ReqNavigation>,
pub req_touch_screen: Option<ReqTouchScreen>,
}
Expand description
Indicates what hardware and software features the application requires.
For example, an application might specify that it requires a physical keyboard or a particular navigation device, like a trackball. The specification is used to avoid installing the application on devices where it will not work.
Note
Most apps should not use this manifest tag
. You should always support input with
a directional pad (d-pad) in order to assist sight-impaired users and support devices
that provide d-pad input in addition to or instead of touch. information about how to
support d-pad input in your app, read Enabling Focus Navigation
. If your app
absolutely cannot function without a touchscreen, then instead use the
<uses-feature>
tag to declare the required touchscreen type, ranging from
"android.hardware.faketouch"
for basic touch-style events to more advanced touch
types such as "android.hardware.touchscreen.multitouch.jazzhand"
for distinct input
from multiple fingers.
XML Syntax
<uses-configuration android:reqFiveWayNav=["true" | "false"]
android:reqHardKeyboard=["true" | "false"]
android:reqKeyboardType=["undefined" | "nokeys" | "qwerty" | "twelvekey"]
android:reqNavigation=["undefined" | "nonav" | "dpad" | "trackball" | "wheel"]
android:reqTouchScreen=["undefined" | "notouch" | "stylus" | "finger"] />
Contained in
Introduced in
API Level 3
Fields§
Whether or not the application requires a five-way navigation control — "true"
if it does, and "false"
if not. A five-way control is one that can move the
selection up, down, right, or left, and also provides a way of invoking the
current selection. It could be a D-pad (directional pad), trackball, or other
device.
If an application requires a directional control, but not a control of
a particular type, it can set this attribute to “true” and ignore the
reqNavigation
attribute. However, if it requires a particular type
of directional control, it can ignore this attribute and set
reqNavigation
instead.
req_hard_keyboard: Option<VarOrBool>
Whether or not the application requires a hardware keyboard — "true"
if it does,
and "false"
if not.
req_keyboard_type: Option<ReqKeyboardType>
The type of keyboard the application requires, if any at all. This attribute does
not distinguish between hardware and software keyboards. If a hardware
keyboard of a certain type is required, specify the type here and also set the
reqHardKeyboard attribute to "true"
.
The navigation device required by the application, if any.
If an application requires a navigational control, but the exact type of
control doesn’t matter, it can set the reqFiveWayNav
attribute to “true”
rather than set this one.
req_touch_screen: Option<ReqTouchScreen>
The type of touch screen the application requires, if any at all.
Trait Implementations§
source§impl Clone for UsesConfiguration
impl Clone for UsesConfiguration
source§fn clone(&self) -> UsesConfiguration
fn clone(&self) -> UsesConfiguration
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for UsesConfiguration
impl Debug for UsesConfiguration
source§impl Default for UsesConfiguration
impl Default for UsesConfiguration
source§fn default() -> UsesConfiguration
fn default() -> UsesConfiguration
source§impl<'de> Deserialize<'de> for UsesConfiguration
impl<'de> Deserialize<'de> for UsesConfiguration
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<UsesConfiguration> for UsesConfiguration
impl PartialEq<UsesConfiguration> for UsesConfiguration
source§fn eq(&self, other: &UsesConfiguration) -> bool
fn eq(&self, other: &UsesConfiguration) -> bool
self
and other
values to be equal, and is used
by ==
.