My Android advanced tour ------ & gt; configuration identifiers supported by Android SDK (useful reference files), androidsdk

Source: Internet
Author: User

My Android advanced tour ------> Configuration identifiers supported by Android SDK (useful reference files) and androidsdk

The Android SDK supports the configuration of the flag.


Configuration identifier
Identifier value
Description

MCC MNC

Example:

Mcc310;

MCC310-MNC004;

MCC208-MNC00


MCC (mobile Country Code, Moblie Country Code) and optional MNC (mobile Network Code, Moblie Network Code) are information read from the SIM card. For example, mcc310 represents a US operator, mcc310-mnc004 represents Verizon, and mcc208-mnc00 represents Orange, France.

If the device uses a wireless Connection (Radio Connection) (GSM mobile phone), MCC reads data from the SIM card and MNC reads data from the network connected to the device.

You can also use MCC independently (for example, an application can contain legal resources of a specific country ). If you only want to know the language, you can use the language and region identifier (as discussed below ). If you think that the MCC and MNC identifiers are used, you should carefully test whether it can run normally.


Language)

And

Region)


Example:

Zh-rCh;

En;

Fr;

En-rUS;

Rf-rFR;

Rf-rCA;


The language identifier is defined as a code with two letters. For detailed definitions, see ISO 639-1. the region identifier is optional and can contain two letters (but a lower-case "r" must be added before the Code "), for detailed definitions, see the relevant content of ISO 3166-1-alpha-2.

The language and region are case insensitive. The "r" prefix is used to distinguish a region, but cannot specify a region separately. That is, the specified region must first specify the language.

If the user and region change the current language in the system settings, the program will change its language at runtime (select the Resource Directory that matches the current language to read the resource)


Screen Size

(Screen Size


Small;

Normall;

Large;

Xlarge.


Small: uses a low-density QVGA screen. The screen width is the same as that of HVGA, but the height is smaller than that of HVGA. The screen ratio of HVGA is, while that of QVGA is. The minimum QVGA resolution is about 320 × 426. For example, QVGA low density and VGA high density are close to this resolution.

Normal: Use the VGA medium density screen. The approximate resolution of the screen is 480x640. For example, the density of the VGA and WVGA screens is close to this resolution.

Xlarge: Based on High-density screens. The screen resolution is about 720 × 960. This large resolution requires that the API Level be at least 9. That is to say, Android 3.1 and later versions support this large resolution screen.

Minimum API Level: 4 (Android 1.6)


Screen appearance

(Screen Aspect)


Long;

Notlong.


Long: long screen, such as WQVGA, WVGA, and FWVGA.

Notlong: displays that do not look long, such as QVGA, HVGA, or VGA.

The screen appearance identifier is only based on the aspect ratio of the screen and has nothing to do with the screen direction. Minimum value of API Level: 4


Screen direction

(Screen Orientation)


Port;

Land.


Port: Set the vertical (or portrait) Direction;

Land: sets the horizontal (or landscape) Direction.


Base Mode) Car
Desk
Car: the device is placed under the device seat
Desk: the device is placed on the desktop base.
Minimum API Level: 8

Night mode

(Night Mode)


Night;

Notnight.


Night: night;

Notnight: daytime.

Minimum APILevel: 8 (Android 2.2)


Screen pixel density [dpi]


Ldpi;

Mdpi;

Hdpi;

Xhdpi;

Nodpi;
Tvdpi.

Ldpi: Low-Density employment with a density of about 120 dpi;

Mdpi: Medium Density (traditional HVGA) screen with a density of about 160 dpi;

Hdpi: high-density screen with a density of about 240 dpi;

Xhdpi: expanded high-density screen with a density of about 320 dpi. The minimum value of API Level is 8 (Android 2.2 );

Nodpi: applies to bitmap resources that do not require more screen density for stretching;

Tvdpi: the screen density between mdpi and hdpi (about DPI ). This screen density is usually used in Smart TVs. The minimum value of API Level is 13 (Android 3.2 ).


Touch screen type

(Touchscreen Type)


Notouch;

Stylus

Finger.


Notouch: The settings do not support touch screens.

Stylus: The device supports touch screen with a pen (finger touch is not supported)

Finger: set to support touch screen (may support only fingers, or both pen and finger ).


Available keyboard

(Keyboard Availability)


Keysexposed;

Keyshidden;

Keyssoft.


Keysexposed: Set the keyboard availability (including software disks and physical keyboards ). The device Keyboard can be divided into the following two situations:

L only a soft keyboard, no physical or physical keyboard is disabled. This value is only used for the keyboard.

L only has a physical keyboard, and no soft or soft keyboard is disabled. This value is only used for the physical keyboard.

Keyshidden: the device has a physical keyboard, but it is hidden (not pulled out) and there is no available soft keyboard.

Keyssoft: the device has a keyboard, whether or not it can be used.


Preferred text input mode

(Primary Text Input Method)


Nokeys;

Qwerty;

12key.


Nokeys: The device does not have any physical buttons for text input;

Qwerty: the device has a physical querty keyboard (the same as the standard computer keyboard), regardless of whether the physical keyboard is available to users;

12 key: the device has a 12-key physical keyboard, whether or not it is useful to users.


Navigation key?

(Navigation key availability)


Navexposed;

Navhidden.


Navexposed: With a navigation key, you can use it;

Navhidden: the navigation key is not available (for example, the lid is not opened when you flip the phone ).


Preferred non-lending touch navigation

(Primary Non-touch Navigation Method)


Nonav;

Dpad;

Trackball;

Wheel.


Nonav: the device has no non-touch navigation mode;

Dpad: Do not navigate through the d-pad;

Trackball: The device uses a trackball to navigate;

Wheel: the device is guided by a pulley.


Platform version

(Platform Version [API Level])


Example:

V3;

V4;

V7;

And so on.


The lowest API Level version. For example, v1 indicates API Level 1 (Android 1.0 or a later version is required), and v7 indicates API Level 7 (Android 2.1 or a later version is required ).

Note: although the platform identifier can be equal to or greater than the current Android version, Android 1.5 (v3) and Android 1.6 (v4) are two exceptions. Because there are bugs in these two versions. Therefore, in these two versions, the platform version identifier can only precisely match the current Android version. That is to say, if it is only v3, only Android 1.5 will satisfy this identifier. This bug has been fixed in Android 1.6 and later versions.


Layout Direction)

Example:

Ldrtl and ldltr


Ldrtl indicates the layout from right to left, and LDLR indicates the layout from left to left.

Minimum API Level: 17 (Android 4.2)


Minimum screen width

(SmallestWidth)


Sw <N> dp, where N represents an integer.

Example:

Sw320dp;

Sw600dp;

Sw720dp.


The smallest pixel of the screen width. The minimum hiring width is the minimum edge width (number of pixels) of the Android device screen. For example, if the resolution is 480 × 800, the minimum screen width is 480, the minimum width does not change with the screen direction.

Below are some common screen size settings.

Sw320dp:

240 x 320ldpi (QVGA screen mobile phone );

320 x ldpi (cell phone with medium density screen );

480 × 800ldpi (cell phone with high-density screen ).

Sw480dp: 480 × 800 mdpi (Medium Density mobile phone or tablet );

Sw600dp: 600 × 1024 mdpi (medium density 7 inch tablet, such as Nexus 7 );

Sw720dp: 720x1280 mdpi (medium density 10 inch tablet, such as Nexus 10 ).


The minimum screen width includes not only available areas, but also areas that are not available (such as the system status bar ). The system selects a resource directory that is close to the minimum width of the current screen (cannot exceed. For example, if the minimum width of the current screen is 600 and there is a res/drawable-sw580dp directory in the Resource Directory, the system will use the resources in that directory, because 580 is close to 600 and not more than 600.


Minimum API Level: 13 (Android 3.2)


Some readers may wonder why there are two 480 × 800 above. in fact, the two 480x800 resolutions are different. One is the medium density (sw480dp) and the other is the high density (sw320dp ). In order to make a tablet computer, the screen is often very large, such as 6 inch or 7 inch. However, although the screen size increases, the screen resolution is not increased to save costs, this means that the screen density (the number of pixels not included in the inch) is reduced. That is to say, a 4 inch high-density screen (resolution is 480 × 800) Mobile Phone programming 7 inch tablet, but the resolution is still 480 × 800. therefore, although 7 inch of tablets are larger than 4 inch of mobile phones, as the screen density is reduced, the display effect of tablets is not as good as that of mobile phones with the same resolution. For example, although the resolution of Nexus 7 is 1280 × 800, the display effect is not as good as that of Nexus 4 with a high screen density due to the medium screen density.


Available screen width

(Available width)


W <N> dp, where N represents an integer.

Example:

W720dp;

W1024dp.


Minimum width of the screen. The width here is the width of the value from the left side of the screen to the right side. When the screen direction changes, the available width also changes. For example, the screen resolution of Nexus 7 is 1280 × 800. If Nexus 7 is placed horizontally (the bottom side is the side length), the width of the screen can be 1280, if you place Nexus 7 vertically (the bottom side is a short side), the width can be 800.

For example, the paths of the two main_activity.xml files are as follows:

1. res/layout-sw600dp/main_activity.xml

1. res/layout-sw600dp-w720dp/main_activity.xml

Assume that the program runs on Nexus 7. When Nexus 7 is placed vertically, the screen width is 800 and the minimum screen width is 800. Therefore, the system uses the main_activity file in the 1st resource directories. When the screen direction changes to horizontal, the available screen width is 1280, and 2nd of the 720 resource directories (to be converted to the actual pixel width, the screen density of Nexus 7 is 216, therefore, the pixel width is 720x216/160 = 972) and is close to 1280 (the system selects the nearest local resource directory ). Therefore, the system will use the main_activity file in the 2nd Resource Directory.

Minimum API Level: 13 (Android 3.2)


Available screen height

(Available height)


H <N> dp, where N represents an integer.

Example:

201720dp;

H1024dp.


Minimum height available for the screen. The height here is the height from the top of the screen to the bottom of the screen. When the screen direction changes, the available height also changes. For example, the screen resolution of Nexus 7 is 1280 × 800. If Nexus 7 is placed horizontally (the bottom side is the side length), the height can be 900, if you place Nexus 7 vertically (the bottom side is a short side), the width can be 1280.

For example, the paths of the two main_activity.xml files are as follows:

1. res/layout-sw600dp/main_activity.xml

1. res/layout-sw600dp-w720dp/main_activity.xml

Assume that the program runs on Nexus 7. When Nexus 7 is placed horizontally, the available screen height is 800 and the minimum screen height is 800. Therefore, the system uses the main_activity file in the 1st resource directories. When the screen orientation is portrait, the available screen width is 1280, and 2nd of the 720 resource directories (to convert to the actual pixel width, the screen density of Nexus 7 is 216, therefore, the pixel width is 720x216/160 = 972) and is close to 1280 (the system selects the nearest local resource directory ). Therefore, the system will use the main_activity file in the 2nd Resource Directory.

Minimum API Level: 13 (Android 3.2)




 


========================================================== ========================================================== ============================

Author: Ouyang Peng: Welcome to repost. sharing with others is the source of progress!

Reprinted Please retain the original address: http://blog.csdn.net/ouyang_peng

========================================================== ========================================================== ============================


Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

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.