다음을 통해 공유


WindowManager.PropertyCompatAllowIgnoringOrientationRequestWhenLoopDetected Field

Definition

Caution

Use 'Android.Views.IWindowManager.PropertyCompatAllowIgnoringOrientationRequestWhenLoopDetected'. 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-out from the compatibility treatment that avoids android.app.Activity#setRequestedOrientation Activity#setRequestedOrientation() loops.

[Android.Runtime.Register("PROPERTY_COMPAT_ALLOW_IGNORING_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED", ApiSince=35)]
[System.Obsolete("Use 'Android.Views.IWindowManager.PropertyCompatAllowIgnoringOrientationRequestWhenLoopDetected'. This class will be removed in a future release.")]
public const string PropertyCompatAllowIgnoringOrientationRequestWhenLoopDetected;
[<Android.Runtime.Register("PROPERTY_COMPAT_ALLOW_IGNORING_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED", ApiSince=35)>]
[<System.Obsolete("Use 'Android.Views.IWindowManager.PropertyCompatAllowIgnoringOrientationRequestWhenLoopDetected'. This class will be removed in a future release.")>]
val mutable PropertyCompatAllowIgnoringOrientationRequestWhenLoopDetected : 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-out from the compatibility treatment that avoids android.app.Activity#setRequestedOrientation Activity#setRequestedOrientation() loops. Loops can be triggered by the OEM-configured ignore requested orientation display setting (on Android 12 (API level 31) and higher) or by the landscape natural orientation of the device.

The system could ignore android.app.Activity#setRequestedOrientation Activity#setRequestedOrientation() call from an app if both of the following conditions are true: <ul> <li>Activity has requested orientation more than two times within one-second timer <li>Activity is not letterboxed for fixed orientation </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.

Not setting this property at all, or setting this property to true has no effect.

<b>Syntax:</b>

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

Java documentation for android.view.WindowManager.PROPERTY_COMPAT_ALLOW_IGNORING_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED.

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