共用方式為


View.SystemUiVisibility 屬性

定義

警告

This property has an incorrect enumeration type. Use the SystemUiFlags property instead.

傳回這個檢視要求的最後 #setSystemUiVisibility(int) 一個。 -或- 要求變更狀態列或其他螢幕/視窗裝飾的可見度。

[System.Obsolete("This property has an incorrect enumeration type. Use the SystemUiFlags property instead.")]
public virtual Android.Views.StatusBarVisibility SystemUiVisibility { [Android.Runtime.Register("getSystemUiVisibility", "()I", "GetGetSystemUiVisibilityHandler")] get; [Android.Runtime.Register("setSystemUiVisibility", "(I)V", "GetSetSystemUiVisibility_IHandler")] set; }
[<System.Obsolete("This property has an incorrect enumeration type. Use the SystemUiFlags property instead.")>]
[<get: Android.Runtime.Register("getSystemUiVisibility", "()I", "GetGetSystemUiVisibilityHandler")>]
[<set: Android.Runtime.Register("setSystemUiVisibility", "(I)V", "GetSetSystemUiVisibility_IHandler")>]
member this.SystemUiVisibility : Android.Views.StatusBarVisibility with get, set

屬性值

旗標 #SYSTEM_UI_FLAG_LOW_PROFILE、、#SYSTEM_UI_FLAG_HIDE_NAVIGATION、、#SYSTEM_UI_FLAG_FULLSCREEN#SYSTEM_UI_FLAG_LAYOUT_STABLE#SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION#SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN#SYSTEM_UI_FLAG_IMMERSIVE#SYSTEM_UI_FLAG_IMMERSIVE_STICKY的位或 。

屬性

備註

屬性 getter 檔:

傳回這個檢視要求的最後 #setSystemUiVisibility(int) 一個。

已取代這個成員。 SystemUiVisibility 旗標已被取代。 請改用 WindowInsetsController

android.view.View.getSystemUiVisibility()Java 檔。

屬性 setter 檔:

要求變更狀態列或其他螢幕/視窗裝飾的可見性。

這個方法可用來透過暗灰色或隱藏周圍的系統能供性,將裝置 UI 置於暫時模式中,讓使用者的注意力更著重於應用程式內容。 這通常與 Window#FEATURE_ACTION_BAR_OVERLAY Window.FEATURE_ACTION_BAR_OVERLAY搭配使用,可讓應用程式內容放在動作列後面(使用這些旗標其他系統能供性),以便隱藏和顯示它們之間的順暢轉換。

使用系統 UI 可見性的兩個代表性範例是實作內容瀏覽應用程式(例如雜誌閱讀程式)和影片播放應用程式。

第一個程式代碼顯示內容瀏覽應用程式中檢視的典型實作。 在此實作中,應用程式會隱藏狀態列和動作列,並將導覽元素放入燈出模式,進入內容導向模式。 然後,使用者可以在此模式中與內容互動。 這類應用程式應該提供一個簡單的方式,讓使用者切換出模式(例如檢查狀態列或存取通知中的資訊)。 在此實作中,只要點選內容即可完成此作業。

{

已取代這個成員。 SystemUiVisibility 旗標已被取代。 請改用 WindowInsetsController

android.view.View.setSystemUiVisibility(int)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於