Screen size supported by the application Androidmanifest.xml file details (supports-screens) (GO)

Source: Internet
Author: User

Syntax (SYNTAX):

<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 (CONTAINED in):

<manifest>

Description (DESCRIPTION):

This element is used to specify the screen size supported by the application and to enable screen compatibility mode for larger screens than those supported by the application. It is important to use this element in your application to specify the screen size that your application supports.

If the application resizes the Size property to fill the entire screen, then the application will support this given size. Usually for most applications, the system can do a good job of doing this, and in order for the application to work on a screen larger than a handheld device, you don't need to do any extra work. However, for different screen sizes, it is often important to optimize the application's UI by providing an optional layout resource. For example, an activity layout that runs on a handheld device requires you to modify the layout of the activity if you want to run it on a tablet.

However, if the size is resized to accommodate different screen sizes, but the application does not work well, you can use the properties of the <supports-screens> element to control whether the application should be published to a smaller screen device, or to use the system's screen compatibility mode. Let the UI zoom in to fit the larger screen's requirements. In the absence of a design for a larger screen size, and the normal size does not meet the right results, the screen's compatibility mode scales the UI by simulating a normal-sized screen and medium density so that it fills the entire screen, which can cause the UI to blur, so optimizations for large screens are better.

Note: Android3.2 introduces new properties: ANDROID:REQUIRESSMALLESTWIDTHDP, ANDROID:COMPATIBLEWIDTHLIMITDP, and Android: LARGESTWIDTHLIMITDP. If you are developing Android3.2 or later applications, you should use these properties to declare the screen sizes supported by your application, rather than based on the general screen size properties.

For more information about how to correctly support different screen sizes to avoid using screen compatibility mode with your application, read "Supporting multiple Screens"

(http://developer.android.com/guide/practices/screens_support.html)

Properties (ATTRIBUTES):

Android:resizeable

This property is used to indicate whether the application can resize for different screen sizes. The default value is true. If this property is set to false, on a large screen, the system will run the application in screen compatibility mode.

This attribute was deprecated, and the introduction of this property was primarily intended to help the application transition from 1.5 to 1.6. When multi-screen support is introduced, it should not be used.

Android:smallscreens

This property is used to specify whether the application supports a smaller form factor screen. A small type of screen is defined as a screen that is smaller than the normal (traditional HVGA) type of screen. External services, such as Google Play, do not provide small-screen apps for applications that do not support small screens, as there are few platforms that can ensure that the application works on a small screen device. The default value for this property is true.

Android:normalscreens

This property is used to indicate whether the application supports a normal form factor screen. The typical HVGA is a medium-density screen, but WQVGA low-density and WVGA high-density screens are also considered normal screens. The default value for this property is true.

Android:largescreens

This property is used to indicate whether the application supports a larger form factor screen. A large type of screen is defined as a screen that is significantly larger than the screen of the normal type of handheld device, and in order for the application to work well, use this property with particular care, although you can rely on the system to resize it to fill the screen.

The default value of this property is actually different between some versions, so it is best to explicitly declare this property at any time. If set to False, the system will enable screen compatibility mode, so be extra careful.

Android:xlargescreens

This property is used to indicate whether the application supports large-form screens. A xlarge screen is defined as a screen larger than the large screen, such as a tablet, which needs to be used with great care in order for the application to work well, although it can rely on the system to fill the screen with the size of the UI.

Android:anydensity

This property indicates whether the application contains resources that can be applied to any screen density.

For applications that support Android1.6 (API level 4) and later, the default value for this property is true, and it should not be set to false unless you absolutely acknowledge that this is necessary for the application to work properly. It is only necessary to suppress this property when the application directly operates the bitmap.

Android:requiressmallestwidthdp

This property is used to specify the minimum requirements for smallestwidth. Smallestwidth is the minimum size (in DP) of screen space, which must be valid for the UI of the application. That is, it is the shortest one in the size of the two dimensions of a valid screen. Therefore, in order to consider device compatibility with the application, the value of the device's smallestwidth must be greater than or equal to the value set by this property. Typically this property value is for the minimum width supported by the layout, not the current orientation of the screen.

For example, a typical handheld device screen smallestwidth is a 320dp;7-inch tablet that smallestwidth is 600dp;10 inches of the tablet's smallestwidth is 720DP. These values are generally the smallest width because they are the shortest size in the free space on the screen.

This comparison of this dimension value requires consideration of the screen decoration and the System UI section. For example, if the system has some fixed UI elements to display, the system-declared minimum width of the device (smallestwidth) is smaller than the actual screen size, because the screen pixels occupied by the system UI are not valid for the applied UI. Therefore, this value should be the minimum width requirement used by the application layout, regardless of the current orientation of the screen.

This property is not required if the application is able to make the correct adjustment for the smaller screen size (small size or the minimum width is 320dp below the screen). Otherwise, you should use this property value to match the value of the minimum screen width qualifier used by the application (SW<N>DP).

Warning: The Android system does not care about this property, so it does not affect the behavior of the application at run time. Instead, it is used by services, such as Google Play, to filter applications. However, currently Google Play does not support filtering (on Android3.2) with this attribute, so if your application does not support small screen devices, you should continue to use other dimension attributes.
This attribute is introduced in API level 13.

Android:compatiblewidthlimitdp

This property allows the screen compatibility mode to be enabled as a user-selectable feature when designing an application by specifying the maximum "smallest-width". If the minimum edge of the device's active screen is larger than the value of this property, the user will still be able to install the application, but will use screen compatibility mode at run time. Screen compatibility mode appears to be disabled by default, and fills the screen by resizing the layout, but there is a button in the system bar that allows the user to select the screen compatibility mode to turn on and off.

This property is not required if the application is compatible with all screen sizes and its layout can be resized correctly.

Note: Currently, screen compatibility mode can only simulate a handheld screen with a width of 320DP, so if the value of ANDROID:COMPATIBLEWIDTHLIMITDP is greater than 320, screen compatibility mode will not be applied.

This is introduced in API level 13.

Android:largestwidthlimitdp

This property allows the application to be re-designed by specifying the maximum "smallest screen width" to force the display compatibility mode to be enabled. If the minimum edge of the device's active screen is larger than the value of this property, the application runs in screen compatibility mode, and the user does not have the option to prohibit this mode.

This property is not required if the application is compatible with all screen sizes and can be resized correctly. Otherwise, consider using the ANDROID:COMPATIBLEWIDTHLIMITDP property first. This property should only be used when the functionality of the application is compromised by a large screen size adjustment, and the use of screen compatibility mode is the only way to do so.

Note: Currently, screen compatibility mode can only simulate a handheld screen with a width of 320DP, so if the value of ANDROID:COMPATIBLEWIDTHLIMITDP is greater than 320, screen compatibility mode will not be applied.

This is introduced in API level 13.

Introduced version (introduced in):

API Level 4

Screen size supported by the application Androidmanifest.xml file details (supports-screens) (GO)

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.