Android Development-api Guide-<uses-configuration>

Source: Internet
Author: User

<uses-configuration>

English Original: http://developer.android.com/guide/topics/manifest/uses-configuration-element.html
Acquisition (update) Date: 2014-7-7
Moved from the original blog: http://blog.sina.com.cn/s/blog_48d491300100zmvv.html

Grammar:
< uses-configuration    Android:reqfivewaynav | "false"]   android:reqhardkeyboard| "false"]   android:reqkeyboardtype| "Nokeys" | "QWERTY" | "Twelvekey"]   android:reqnavigation| "Nonav" | "Dpad" | "Trackball" | "Wheel"]   android:reqtouchscreen/>
Included in:
<manifest>
Description
indicates the software and hardware requirements of the application. For example, you can declare a special navigation device that requires a physical keyboard or trackball. These claims can be used to avoid installing an application on a device that cannot be run.

Note: Most applications should not use this Manifest tag. to help visually impaired users, it is necessary to ensure that the program can use the arrow keys (D-PAD) as input means, and support the direction key as a supplement or replacement of the touchscreen device. For information about how to support directional key input in your application, see Enable navigation for input focus. If the application leaves the touchscreen, it will not work properly, then use the <uses-feature> label to declare the desired touchscreen type, from the simplest touch type "android.hardware.faketouch" to more advanced "android.hardware.touchscreen.multitouch.jazzhand" multi-touch input such as that.

Property:
android:reqFiveWayNav
Whether the application requires a five-D navigation key-" true " is used, "" false is not used. The five-D control key can move up and down and commit the currently selected item, which can be d-pad (arrow keys), trackball, or other device.

If your application requires a directional key, but does not specify which device, you can set this property to " true " and ignore the reqNavigation property. However, if you need a direction key of a specified type, you can ignore this property and swap it reqNavigation .

android:reqHardKeyboard
whether the application needs to use the hardware keyboard-"", "" " true false is not used.
android:reqKeyboardType
The type of keyboard that the application needs to use when the keyboard is present. This property does not differentiate between a hard keyboard and a soft keyboard. If you need to specify a type of hardware keyboard, set this property and set the reqHardKeyboard property to " true ".

This property value must be one of the following strings:

value Description
"undefined" The application does not need to use the keyboard (the keyboard requirements are not declared.) This is the default value.
"nokeys" The application does not need to use the keyboard.
"qwerty" The application needs to use a standard QWERTY keyboard.
"twelvekey" The application needs to use the 12-key numeric keypad that comes with most phones-including the number key 0-9 , the asterisk ( * ), and the pound ( # ) key.
android:reqNavigation
The navigation device that the application needs to use when the device is present. This property value must be one of the following strings:
value Description
"undefined" The application does not need to use the navigation keys. (The navigation key requirement is not declared.) This is the default value.
"nonav" The application does not need to use the navigation keys.
"dpad" The application needs to navigate using the D-pad (arrow keys).
"trackball" The application needs to navigate with the trackball.
"wheel" The application needs to use the navigation wheel.

If your application needs a navigation key, but it doesn't matter what kind of exact type it is, you can reqFiveWayNav set the property to " true " instead of this property.

android:reqTouchScreen
The type of touch screen the application needs to use when the device is present. This property value must be one of the following strings:
value Description
"undefined" The application does not need to use the touch screen. (Touch screen requirements are not declared.) This is the default value.
"notouch" The application does not need to use the touch screen.
"stylus" The application requires a touch screen with stylus operation.
"finger" The application needs a touch screen with finger manipulation.

Note: If the application needs to use some type of touchscreen input, swap <uses-feature> the type requirements of the claims touchscreen to "android.hardware.faketouch" start with the basic touch event.

Introduced from:
API Level 3
See:
  • <activity> Attributes of the element configChanges
    • ConfigurationInfo

Android Development-api Guide-<uses-configuration>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.