Sdílet prostřednictvím


WindowManager.PropertyCompatAllowDisplayOrientationOverride Field

Definition

Caution

Use 'Android.Views.IWindowManager.PropertyCompatAllowDisplayOrientationOverride'. This class will be removed in a future release.

Application level android.content.pm.PackageManager.Property PackageManager .Property for an app to inform the system that the app should be opted-out from the compatibility override that fixes display orientation to landscape natural orientation when an activity is fullscreen.

[Android.Runtime.Register("PROPERTY_COMPAT_ALLOW_DISPLAY_ORIENTATION_OVERRIDE", ApiSince=34)]
[System.Obsolete("Use 'Android.Views.IWindowManager.PropertyCompatAllowDisplayOrientationOverride'. This class will be removed in a future release.")]
public const string PropertyCompatAllowDisplayOrientationOverride;
[<Android.Runtime.Register("PROPERTY_COMPAT_ALLOW_DISPLAY_ORIENTATION_OVERRIDE", ApiSince=34)>]
[<System.Obsolete("Use 'Android.Views.IWindowManager.PropertyCompatAllowDisplayOrientationOverride'. This class will be removed in a future release.")>]
val mutable PropertyCompatAllowDisplayOrientationOverride : string

Field Value

Attributes

Remarks

Application level android.content.pm.PackageManager.Property PackageManager .Property for an app to inform the system that the app should be opted-out from the compatibility override that fixes display orientation to landscape natural orientation when an activity is fullscreen.

When this compat override is enabled and while display is fixed to the landscape natural orientation, the orientation requested by the activity will be still respected by bounds resolution logic. For instance, if an activity requests portrait orientation, then activity will appear in the letterbox mode for fixed orientation with the display rotated to the lanscape natural orientation.

The treatment is disabled by default but device manufacturers can enable the treatment using their discretion to improve display compatibility on the displays that have ignoreOrientationRequest display setting enabled (enables compatibility mode for fixed orientation, see Enhanced letterboxing for more details).

With this property set to true or unset, the system wiil use landscape display orientation when the following conditions are met: <ul> <li>Natural orientation of the display is landscape <li>ignoreOrientationRequest display setting is enabled <li>Activity is fullscreen. <li>Device manufacturer enabled the treatment. </ul>

With this property set to false, device manufactured per-app override for display orientation won't be applied.

<b>Syntax:</b>

&lt;application&gt;
              &lt;property
                android:name="android.window.PROPERTY_COMPAT_ALLOW_DISPLAY_ORIENTATION_OVERRIDE"
                android:value="true|false"/&gt;
            &lt;/application&gt;

Java documentation for android.view.WindowManager.PROPERTY_COMPAT_ALLOW_DISPLAY_ORIENTATION_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.

Applies to