<compatible-screens>

syntax:
<compatible-screens>
    <screen android:screenSize=["small" | "normal" | "large" | "xlarge"]
            android:screenDensity=["ldpi" | "mdpi" | "hdpi" | "xhdpi"] />
    ...
</compatible-screens>
contained in:
<manifest>
description:
Specifies each screen configuration with which the application is compatible. Only one instance of the <compatible-screens> element is allowed in the manifest, but it can contain multiple <screen> elements. Each <screen> element specifies a specific screen size-density combination with which the application is compatible.

The Android system does not read the <compatible-screens> manifest element (neither at install-time nor at runtime). This element is informational only and may be used by external services (such as Android Market) to better understand the application's compatibility with specific screen configurations and enable filtering for users. Any screen configuration that is not declared in this element is a screen with which the application is not compatible. Thus, external services (such as Android Market) should not provide the application to devices with such screens.

Caution: Normally, you should not use this manifest element. Using this element can dramatically reduce the potential user base for your application, by not allowing users to install your application if they have a device with a screen configuration that you have not listed. You should use it only as a last resort, when the application absolutely does not work with all screen configurations. Instead of using this element, you should follow the guide to Supporting Multiple Screens, in order to provide complete support for multiple screens, by adding alternative resources for different screen sizes and densities.

If you want to set only a minimum screen size for your your application, then you should use the <supports-screens> element. For example, if you want your application to be available only for large and xlarge screen devices, the <supports-screens> element allows you to declare that your application does not support small and normal screen sizes. External services (such as Android Market) will filter your application accordingly. You can also use the <supports-screens> element to declare whether the system should resize your application for different screen sizes.

Also see the Market Filters document for more information about how Android Market filters applications using this and other manifest elements.

child elements:
<screen>
Specifies a single screen configuration with which the application is compatible.

At least one instance of this element must be placed inside the <compatible-screens> element. This element must include both the android:screenSize and android:screenDensity attributes (if you do not declare both attributes, then the element is ignored).

attributes:

android:screenSize
Required. Specifies the screen size for this screen configuration.

Accepted values:

  • small
  • normal
  • large
  • xlarge

For information about the different screen sizes, see Supporting Multiple Screens.

android:screenDensity
Required. Specifies the screen density for this screen configuration.

Accepted values:

  • ldpi
  • mdpi
  • hdpi
  • xhdpi

For information about the different screen densities, see Supporting Multiple Screens.

introduced in:
API Level 9
see also:
Supporting Multiple Screens
Market Filters
↑ Go to top