Sdílet prostřednictvím


View.SystemUiVisibility Property

Definition

Caution

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

Returns the last #setSystemUiVisibility(int) that this view has requested. -or- Request that the visibility of the status bar or other screen/window decorations be changed.

[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

Property Value

Bitwise-or of flags #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, and #SYSTEM_UI_FLAG_IMMERSIVE_STICKY.

Attributes

Remarks

Property getter documentation:

Returns the last #setSystemUiVisibility(int) that this view has requested.

This member is deprecated. SystemUiVisibility flags are deprecated. Use WindowInsetsController instead.

Java documentation for android.view.View.getSystemUiVisibility().

Property setter documentation:

Request that the visibility of the status bar or other screen/window decorations be changed.

This method is used to put the over device UI into temporary modes where the user's attention is focused more on the application content, by dimming or hiding surrounding system affordances. This is typically used in conjunction with Window#FEATURE_ACTION_BAR_OVERLAY Window.FEATURE_ACTION_BAR_OVERLAY, allowing the applications content to be placed behind the action bar (and with these flags other system affordances) so that smooth transitions between hiding and showing them can be done.

Two representative examples of the use of system UI visibility is implementing a content browsing application (like a magazine reader) and a video playing application.

The first code shows a typical implementation of a View in a content browsing application. In this implementation, the application goes into a content-oriented mode by hiding the status bar and action bar, and putting the navigation elements into lights out mode. The user can then interact with content while in this mode. Such an application should provide an easy way for the user to toggle out of the mode (such as to check information in the status bar or access notifications). In the implementation here, this is done simply by tapping on the content.

{

This member is deprecated. SystemUiVisibility flags are deprecated. Use WindowInsetsController instead.

Java documentation for android.view.View.setSystemUiVisibility(int).

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