IWindowManager.PropertyCompatAllowUserAspectRatioOverride Field
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Application level
android.content.pm.PackageManager.Property PackageManager.Property
tag that (when set to false) informs the system the app has opted out of the
user-facing aspect ratio compatibility override.
[Android.Runtime.Register("PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE", ApiSince=35)]
public const string PropertyCompatAllowUserAspectRatioOverride;
[<Android.Runtime.Register("PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE", ApiSince=35)>]
val mutable PropertyCompatAllowUserAspectRatioOverride : string
Field Value
- Attributes
Remarks
Application level android.content.pm.PackageManager.Property PackageManager.Property
tag that (when set to false) informs the system the app has opted out of the user-facing aspect ratio compatibility override.
The compatibility override enables device users to set the app's aspect ratio or force the app to fill the display regardless of the aspect ratio or orientation specified in the app manifest.
The aspect ratio compatibility override is exposed to users in device settings. A menu in device settings lists all apps that have not opted out of the compatibility override. Users select apps from the menu and set the app aspect ratio on a per-app basis. Typically, the menu is available only on large screen devices.
When users apply the aspect ratio override, the minimum aspect ratio specified in the app manifest is overridden. If users choose a full-screen aspect ratio, the orientation of the activity is forced to android.content.pm.ActivityInfo#SCREEN_ORIENTATION_USER
; see #PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_FULLSCREEN_OVERRIDE
to disable the full-screen option only.
The user override is intended to improve the app experience on devices that have the ignore orientation request display setting enabled by OEMs (enables compatibility mode for fixed orientation on Android 12 (API level 31) or higher; see Large screen compatibility mode for more details).
To opt out of the user aspect ratio compatibility override, add this property to your app manifest and set the value to false
. Your app will be excluded from the list of apps in device settings, and users will not be able to override the app's aspect ratio.
Not setting this property at all, or setting this property to true
has no effect.
<b>Syntax:</b>
<application>
<property
android:name="android.window.PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE"
android:value="false"/>
</application>
Java documentation for android.view.WindowManager.PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.