android Configuration system settings .

The Configuration class is specially used to describe the configuration information on the mobile device. The configuration information includes user-specific configuration items, as well as the system's dynamic device configuration.

The following methods of Activity can be called in the program to get the Configuration object

//Get the Configuration object of the system
Configuration cfg = getResources().getConfiguration();


The following parameters represent the configuration information

fontScale: Get the scaling factor of the font set by the current user.

keyboard: Get the keyboard type associated with the current device. The return value of this property: KEYBOARD_12KEY (only 12-key keypad), KEYBOARD_NOKEYS, KEYBOARD_QWERTY (normal keyboard)

keyboardHidden: This property returns a boolean value used to identify whether the current keyboard is available. This property will determine not only the system's hardware keyboard, but also the system's soft keyboard (located on the screen).

locale: get the current Locale of the user.

mcc: get the country code of the mobile signal

mnc: get the network code of the mobile signal

navigation: determine the type of the navigation device on the system. The return value of this property: NAVIGATION_NONAV (no navigation), NAVIGATION_DPAD (DPAD navigation)

, NAVIGATION_TRACKBALL (trackball navigation), NAVIGATION_WHEEL (wheel navigation)

orientation: Get the orientation of the system screen. The return value of this property: ORIENTATION_LANDSCAPE (landscape screen), ORIENTATION_PORTRAIT (portrait screen)

touchscreen: Get the touch mode of the system touch screen. Return value of this property: TOUCHSCREEN_NOTOUCH (no touch screen), TOUCHSCREEN_STYLUS (touch pen touch screen),

TOUCHSCREEN_FINGER (touch screen receiving finger)

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327004194&siteId=291194637