語言

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() 迴圈。 迴圈可由原廠設定的忽略請求方向顯示設定(Android 12(API 等級 31 及以上)或裝置的自然橫向方向觸發。

此處理預設是被禁用的,但裝置製造商可自行決定啟用此處理以提升顯示相容性。

當此屬性設為 true時,系統可忽略 android.app.Activity#setRequestedOrientation Activity#setRequestedOrientation() 應用程式呼叫,前提是以下條件之一成立: <ul><li>活動因先前 android.app.Activity#setRequestedOrientation Activity#setRequestedOrientation() 呼叫而重新啟動。 <li>相機相容性力旋轉處理已啟動於封裝中。 </ul>

設定此屬性會 false 通知系統該應用程式必須退出相容處理,即使裝置製造商已選擇該應用程式加入該處理。

<b>語法:</b>

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

Java 文件 android.view.WindowManager.PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於