Go to Android Developer Guide-manifest.xml-<supports-screens

Source: Internet
Author: User

<supports-screens>

Version:Android 3.2

Grammar:

<supports-screensandroid:resizeable=["True"| "false"]

android:smallscreens=["True" | "false"]

android:normalscreens=["True" | "false"]

android:largescreens=["True" | "false"]

android:xlargescreens=["True" | "false"]

android:anydensity=["True" | "false"]

android:requiressmallestwidthdp="integer"

android:compatiblewidthlimitdp="integer"

android:largestwidthlimitdp="integer"/>

Included in:

<manifest>

Description

Specifies the screen size supported by the application and enables screen compatibility mode for screens that are larger than the program supports. It is important to always use this element to specify the screen size that the program supports.

The so-called application "support" screen size, refers to the program can automatically zoom to fill the entire screen. Typically, the system-provided zoom function can be applied to most applications, allowing the program to function properly on a larger screen handheld device without having to do any additional tuning work. However, the alternative layout resources are often used to optimize the user interface to accommodate a variety of screen sizes. For example, to differentiate between running on a tablet device and a handheld device, you might need to modify the activity's layout.

However, if the program does not function properly to accommodate different screen sizes, you can use the properties of the <supports-screens> element to restrict the program from running on a small screen or using the system's screen compatibility mode To scale the user interface to fit a larger screen. If the design of the large screen is not considered and the normal scaling does not achieve the desired result, screen compatibility mode will determine the magnification of the user interface by simulating the normal size of the screen and the medium screen density, and then zoom to fill the entire screen. Note that this causes the user interface to be pixelated and blurry, so it is best to optimize the user interface for large screens.

Note: new properties have been introduced from Android 3.2:ANDROID:REQUIRESSMALLESTWIDTHDP,ANDROID:COMPATIBLEWIDTHLIMITDP, and ANDROID:LARGESTWIDTHLIMITDP. If you are developing an Android version 3.2 or higher, you should use these properties to declare support for screen dimensions, rather than using properties based on normal screen sizes.

For more information on supporting various screen sizes and avoiding screen compatibility modes, see support for multiple screens .

Properties :

Android:resizeable

Indicates whether the application is scaled according to different screen sizes. If set to no, the system will run the application in screen compatibility mode on a larger screen.

This property is obsolete. This attribute was introduced to help the program upgrade from Android 1.5 to 1.6, when support for multiple screens was introduced for the first time. This property should no longer be used.

Android:smallscreens

Indicates whether the application supports smaller screens. Smaller screens are those that are smaller than the "normal" (traditional HVGA) size. Applications that do not support small screens will be banned for small-screen devices in external services, such as Android market, because only a handful of platforms will allow programs to run on small screens. The default value is "true".

Android:normalscreens

Indicates whether the application supports the "normal" screen size. Traditionally referred to as medium-density HVGA screens, low-density WQVGA and high-density WVGA are generally considered normal sizes. The lack of a provincial nature is "true".

Android:largescreens

Indicates whether the application supports large screen sizes. The big screen is significantly larger than the "normal" handheld screen size. Although system-dependent scaling is also available for full-screen display, it may be necessary to perform specific processing of the program components for a better user experience.

The default values for this property vary by version, so it is best to always explicitly declare this property. Note setting to "false" will always enable screen compatibility mode .

Android:xlargescreens

Indicates whether the application supports oversized screen sizes. A large screen is a significantly larger size than the "large" screen, such as a tablet device (or larger), although depending on the scale of the system, it can be displayed in full screen, but for a better user experience it may require specific processing of the program components.

The default values for this property vary by version, so it is best to always explicitly declare this property. Note setting to "false" will always enable screen compatibility mode .

This property is introduced from API level 9.

Android:anydensity

Indicates whether the application contains resources that apply to any screen density.

The default value for this property is "true" for applications that support Android 1.6 (API level 4) or later. It should not be set to "false" unless absolutely sure that the program must be operational. You may need to disable this option only if your application is directly manipulating bitmaps (see Supporting multiple screen documents for details).

Android:requiressmallestwidthdp

Specifies the Smallestwidth minimum value required by the program . Smallestwidth is the minimum value (in DP) of the screen free space that can be used by the program user interface -the shortest side length on both sides of the available screen. To ensure compatibility with the application, the smallestwidth of the device must be greater than or equal to this property value. (This value typically corresponds to the minimum width supported by layout layouts, regardless of the current orientation of the screen.) )

For example, the minimum width of a typical handheld device is 320DP, the minimum width of a 7-inch tablet device is 600DP, and theminimum width of a 10-inch tablet device is 720DP. Because these values are the minimum amount of free space on the screen, it is generally the value of Smallestwidth.

This property value is compared when calculating the component arrangement on the screen and the size of the system user interface. For example, if you need to display some persistent user interface elements on the device screen where the screen location is not available for other user interface elements, the system declares that the device Smallestwidth will be smaller than the actual screen size by calculating the dimensions of these elements. Therefore, this value should be set with the minimum width required for layout, regardless of the orientation of the screen.

This property is not required if the application can be scaled correctly on a small screen (minimum small size or minimum width of 320DP). Otherwise, you should set this property for the minimum screen width identifier to match the minimum size required by the application.

Warning: The Android system does not care about this property, so it does not affect the performance of the program when it runs. It is used to enable filtering for services such as Android market. However,Android Market does not currently support filtering for this property (Android 3.2), so if the program does not support small screens, you should continue to use other screen size properties to restrict it.

This property is introduced from API level 13.

Android:compatiblewidthlimitdp

This property enables screen compatibility mode as a user-selectable option by specifying the maximum number of "minimum screen widths" supported by the program. If the device is available on the minimum edge of the screen to grow up in the value set here, the user will still be able to install the program but will run in screen compatibility mode. By default, screen Compatibility mode will be turned off,layout will be scaled to full screen as usual, but a button will appear in the System status bar, which users can use to switch screen compatibility mode.

If the application is compatible with all screen sizes andlayout is scaled correctly, then this property is not required.

Note: the current screen compatibility mode only simulates 320DP-wide screens on handheld devices, so screen compatibility mode will not take effect when ANDROID:COMPATIBLEWIDTHLIMITDP is greater than 320.

This property is introduced from API level 13.

Android:largestwidthlimitdp

This property forces the screen compatibility mode to be turned on by specifying the maximum number of minimum screen widths supported by the program. If the minimum edge of the device screen is older than this property value, the application will run in screen compatibility mode and the user will not be able to turn it off.

If the application is compatible with all screen sizes andlayout is scaled correctly, then this property is not required. Otherwise, you should also prioritize the use of the ANDROID:COMPATIBLEWIDTHLIMITDP property. The ANDROID:LARGESTWIDTHLIMITDP property is used only when the application is scaled to a large screen, and the screen compatibility mode is the only way that the user can use it .

Note: the current screen compatibility mode only simulates 320DP-wide screens on handheld devices, so screen compatibility mode will not take effect when ANDROID:LARGESTWIDTHLIMITDP is greater than 320.

This property is introduced from API level 13.

Go to Android Developer Guide-manifest.xml-<supports-screens

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.