Partager via


WindowManager.PropertyCompatIgnoreRequestedOrientation Field

Definition

Caution

Use 'Android.Views.IWindowManager.PropertyCompatIgnoreRequestedOrientation'. 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 can be opted-in or opted-out from the compatibility treatment that avoids android.app.Activity#setRequestedOrientation loops.

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

Field Value

Attributes

Remarks

Application level android.content.pm.PackageManager.Property PackageManager .Property for an app to inform the system that the app can be opted-in or opted-out from the compatibility treatment that avoids android.app.Activity#setRequestedOrientation loops. The loop can be trigerred by ignoreRequestedOrientation display setting enabled on the device or by the landscape natural orientation of the device.

The treatment is disabled by default but device manufacturers can enable the treatment using their discretion to improve display compatibility.

With this property set to true, the system could ignore android.app.Activity#setRequestedOrientation call from an app if one of the following conditions are true: <ul> <li>Activity is relaunching due to the previous android.app.Activity#setRequestedOrientation call. <li>Camera compatibility force rotation treatment is active for the package. </ul>

Setting this property to false informs the system that the app must be opted-out from the compatibility treatment even if the device manufacturer has opted the app into the treatment.

<b>Syntax:</b>

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

Java documentation for android.view.WindowManager.PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION.

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