Understanding supports-gl-texture and supports-screens in Android Manifest
Overview
The <supports-gl-texture> element in the Android manifest defines which OpenGL ES texture compression formats an application supports. This declaration is used by services like Google Play to filter applications based on device compatibility.
Syntax
<supports-gl-texture android:name="string" />
Description
Each instance of <supports-gl-texture> specifies one texture compression format through the android:name attribute. An application can declare multiple such elements if it supports several formats.
Example:
<supports-gl-texture android:name="GL_OES_compressed_ETC1_RGB8_texture" />
<supports-gl-texture android:name="GL_OES_compressed_paletted_texture" />
These declarations are informational and do not affect installation behavior directly. However, they are utilized by external systems such as Google Play for filtering purposes.
Supported Formats
| Format Descriptor | Description |
|---|---|
GL_OES_compressed_ETC1_RGB8_texture |
Ericsson texture compression, available on all devices supporting OpenGL ES 2.0 |
GL_OES_compressed_paletted_texture |
Generic palette texture compression |
GL_AMD_compressed_3DC_texture |
ATI 3Dc texture compression |
GL_AMD_compressed_ATC_texture |
ATI texture compression (Adreno GPU devices) |
GL_EXT_texture_compression_latc |
Luminance-alpha texture compression |
GL_EXT_texture_compression_dxt1 |
S3 DXT1 texture compression (Tegra2 platform devices) |
GL_EXT_texture_compression_s3tc |
S3 texture compression (Tegra2 platform devices) |
GL_IMG_texture_compression_pvrtc |
PowerVR texture compression (SGX530/540 GPU devices) |
Overview
The <supports-screens> element allows developers to define supported screen sizes and enable compatibility mode for larger screens. It's recommended to explictily specify supported screen sizes to avoid running in scaled modes that may degrade UI quality.
Syntax
<supports-screens
android: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" />
Description
This element controls how an application behaves across different screen sizes. Applications should provide optimized layouts for various screen dimensions rather than relying on scaling.
Attributes
android:resizeable
Indicates whether the app can scale to different screen sizes. Defaults to true. Deprecated since Android 1.6.
android:smallScreens
Defines support for small screens. Defaults to true.
android:normalScreens
Defines support for normal screens. Defaults to true.
android:largeScreens
Defines support for large screens. Defaults vary by version; recommend explicit declaration.
android:xlargeScreens
Defines support for extra-large screens. Introduced in API level 9.
android:anyDensity
Indicates if the app includes resources for any screen density. Defaults to true for API level 4+.
android:requiresSmallestWidthDp
Specifies the minimum smallest width required (in dp). For example, 320dp for standard phones, 600dp for tablets.
android:compatibleWidthLimitDp
Sets maximum smallest width where compatibility mode is enabled. Default behavior is automatic layout adjustment.
android:largestWidthLimitDp
Enforces compatibility mode when screen smallest width exceeds this value.
Compatibility Mode
When an app doesn't properly adapt to larger screens, Android may use compatibility mode to scale the interface. This leads to pixelation and blurriness. Best practice is to design adaptive layouts instead.