Udostępnij za pośrednictwem


View.SystemUiFlagLayoutStable Field

Definition

Flag for #setSystemUiVisibility(int): When using other layout flags, we would like a stable view of the content insets given to #fitSystemWindows(Rect).

[Android.Runtime.Register("SYSTEM_UI_FLAG_LAYOUT_STABLE")]
public const Android.Views.SystemUiFlags SystemUiFlagLayoutStable = 256;
[<Android.Runtime.Register("SYSTEM_UI_FLAG_LAYOUT_STABLE")>]
val mutable SystemUiFlagLayoutStable : Android.Views.SystemUiFlags

Field Value

Value = 256
Attributes

Remarks

Flag for #setSystemUiVisibility(int): When using other layout flags, we would like a stable view of the content insets given to #fitSystemWindows(Rect). This means that the insets seen there will always represent the worst case that the application can expect as a continuous state. In the stock Android UI this is the space for the system bar, nav bar, and status bar, but not more transient elements such as an input method.

The stable layout your UI sees is based on the system UI modes you can switch to. That is, if you specify #SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN then you will get a stable layout for changes of the #SYSTEM_UI_FLAG_FULLSCREEN mode; if you specify #SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN and #SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, then you can transition to #SYSTEM_UI_FLAG_FULLSCREEN and #SYSTEM_UI_FLAG_HIDE_NAVIGATION with a stable layout. (Note that you should avoid using #SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION by itself.)

If you have set the window flag WindowManager.LayoutParams#FLAG_FULLSCREEN to hide the status bar (instead of using #SYSTEM_UI_FLAG_FULLSCREEN), then a hidden status bar will be considered a "stable" state for purposes here. This allows your UI to continually hide the status bar, while still using the system UI flags to hide the action bar while still retaining a stable layout. Note that changing the window fullscreen flag will never provide a stable layout for a clean transition.

If you are using ActionBar in overlay mode with Window#FEATURE_ACTION_BAR_OVERLAY Window.FEATURE_ACTION_BAR_OVERLAY, this flag will also impact the insets it adds to those given to the application.

This member is deprecated. Use WindowInsets#getInsetsIgnoringVisibility(int) instead to retrieve insets that don't change when system bars change visibility state.

Java documentation for android.view.View.SYSTEM_UI_FLAG_LAYOUT_STABLE.

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