- syntax:
-
<compatible-screens> <screen android:screenSize=["small" | "normal" | "large" | "xlarge"] android:screenDensity=["ldpi" | "mdpi" | "hdpi" | "xhdpi" | "280" | "360" | "420" | "480" | "560" ] /> ... </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 doesn't read the
<compatible-screens>
manifest element at any point. This element is informational only and is used by external services, such as Google Play, to better understand the application's compatibility with specific screen configurations and to enable filtering for users.Any screen configuration that isn't declared in this element is a screen with which the application isn't compatible. External services, such as Google Play, don't provide the application to devices with such screens.
Caution: Normally, you don't use this manifest element. Using this element can dramatically reduce the potential user base for your application by preventing users from installing your application if they have a device with a screen configuration that you don't list. Use it only as a last resort, when the application absolutely doesn't work with specific screen configurations. Instead of using this element, follow the guide to supporting multiple screens to provide scalable support for multiple screens using alternative layouts and bitmaps for different screen sizes and densities.
If you want to set a minimum screen size for your your application, use the
<supports-screens>
element. For example, if you want your application to be available only for large and extra-large screen devices, the<supports-screens>
element lets you declare that your application doesn't support small and normal screen sizes. Then, external services like Google Play filter your application accordingly. You can also use the<supports-screens>
element to declare whether the system can resize your application for different screen sizes.For more information about how Google Play filters applications using this and other manifest elements, see Filters on Google Play.
- child elements:
- example
-
If your application is compatible with only small and normal screens, regardless of screen density, then you must specify 12
<screen>
elements, because each screen size has six different density configurations.You must declare each one of these. Any combination of size and density that you don't specify is considered a screen configuration with which your application isn't compatible. Here's what the manifest entry looks like if your application is compatible with only small and normal screens:
<manifest ... > ... <compatible-screens> <!-- all small size screens --> <screen android:screenSize="small" android:screenDensity="ldpi" /> <screen android:screenSize="small" android:screenDensity="mdpi" /> <screen android:screenSize="small" android:screenDensity="hdpi" /> <screen android:screenSize="small" android:screenDensity="xhdpi" /> <screen android:screenSize="small" android:screenDensity="xxhdpi" /> <screen android:screenSize="small" android:screenDensity="xxxhdpi" /> <!-- all normal size screens --> <screen android:screenSize="normal" android:screenDensity="ldpi" /> <screen android:screenSize="normal" android:screenDensity="mdpi" /> <screen android:screenSize="normal" android:screenDensity="hdpi" /> <screen android:screenSize="normal" android:screenDensity="xhdpi" /> <screen android:screenSize="normal" android:screenDensity="xxhdpi" /> <screen android:screenSize="normal" android:screenDensity="xxxhdpi" /> </compatible-screens> <application ... > ... <application> </manifest>
- introduced in:
- API level 9
- see also:
- Screen compatibility overview
- Filters on Google Play
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-05-04 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2023-05-04 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-05-04 UTC."]]