AndroidManifest 之 uses-configuration

本文深入探讨了Android应用中使用的配置输入机制,包括五向导航控制、硬件键盘、键盘类型、导航设备和触屏类型。了解这些配置如何帮助开发者针对不同设备优化用户体验。

 

uses-configuration,可以指定应用程序支持的每个输入机制的组合.可以指定以下输入设备的任意组合.

(1). android:reqFiveWayNav

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.

 

(2). android:reqHardKeyboard (是否支持硬件键盘)

Whether or not the application requires a hardware keyboard — "true" if it does, and "false" if not.

 

(3).android: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 value must be one of the following strings:

ValueDescription
"undefined"The application does not require a keyboard. (A keyboard requirement is not defined.) This is the default value.
"nokeys"The application does not require a keyboard.
"qwerty"The application requires a standard QWERTY keyboard.
"twelvekey"The application requires a twelve-key keypad, like those on most phones — with keys for the digits from 0 through 9 plus star (*) and pound (#) keys.

(4).android:reqNavigation

  The navigation device required by the application, if any. The value must be one of the following strings:

ValueDescription
"undefined"The application does not require any type of navigation control. (The navigation requirement is not defined.) This is the default value.
"nonav"The application does not require a navigation control.
"dpad"The application requires a D-pad (directional pad) for navigation.
"trackball"The application requires a trackball for navigation.
"wheel"The application requires a navigation wheel.

(5).android:reqTouchScreen

The type of touch screen the application requires, if any at all. The value must be one of the following strings:
ValueDescription
"undefined"The application doesn't require a touch screen. (The touch screen requirement is undefined.) This is the default value.
"notouch"The application doesn't require a touch screen.
"stylus"The application requires a touch screen that's operated with a stylus.
"finger"The application requires a touch screen that can be operated with a finger.
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值