语言

WindowManager.PropertyCompatIgnoreRequestedOrientation 字段

定义

注意

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

应用的应用程序级别 android.content.pm.PackageManager.Property PackageManager.Property ,以通知系统可以选择加入或选择退出该应用,以避免 android.app.Activity#setRequestedOrientation Activity#setRequestedOrientation() 循环的兼容性处理。

[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

字段值

特性

注解

应用的应用程序级别 android.content.pm.PackageManager.Property PackageManager.Property ,以通知系统可以选择加入或选择退出该应用,以避免 android.app.Activity#setRequestedOrientation Activity#setRequestedOrientation() 循环的兼容性处理。 可以通过 OEM 配置的忽略请求的方向显示设置(在 Android 12(API 级别 31)及更高版本上或设备的横向自然方向触发循环。

默认情况下,治疗处于禁用状态,但设备制造商可以使用其自由裁量权启用治疗以提高显示兼容性。

如果以下条件之一为 true,则此属性设置为 true,系统可能会忽略 android.app.Activity#setRequestedOrientation Activity#setRequestedOrientation() 来自应用的调用: <ul><li>Activity 由于以前的 android.app.Activity#setRequestedOrientation Activity#setRequestedOrientation() 调用而重新启动。 <li>Camera 兼容力旋转处理对包处于活动状态。 </ul>

将此属性设置为 false 通知系统,即使设备制造商已选择应用进入处理,应用也必须选择退出兼容性处理。

语法:

<application>
<property
                android:name="android.window.PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION"
                android:value="true|false"/>
</application>

Java文档android.view.WindowManager.PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于