Fading Coder

One Final Commit for the Last Sprint

Home > Tools > Content

Understanding supports-gl-texture and supports-screens in Android Manifest

Tools 1

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.

Related Articles

Efficient Usage of HTTP Client in IntelliJ IDEA

IntelliJ IDEA incorporates a versatile HTTP client tool, enabling developres to interact with RESTful services and APIs effectively with in the editor. This functionality streamlines workflows, replac...

Installing CocoaPods on macOS Catalina (10.15) Using a User-Managed Ruby

System Ruby on macOS 10.15 frequently fails to build native gems required by CocoaPods (for example, ffi), leading to errors like: ERROR: Failed to build gem native extension checking for ffi.h... no...

Resolve PhpStorm "Interpreter is not specified or invalid" on WAMP (Windows)

Symptom PhpStorm displays: "Interpreter is not specified or invalid. Press ‘Fix’ to edit your project configuration." This occurs when the IDE cannot locate a valid PHP CLI executable or when the debu...

Leave a Comment

Anonymous

◎Feel free to join the discussion and share your thoughts.