WindowInsetsControllerCompat
class WindowInsetsControllerCompat
kotlin.Any | |
↳ | androidx.core.view.WindowInsetsControllerCompat |
Provide simple controls of windows that generate insets. For SDKs >= 30, this class is a simple wrapper around WindowInsetsController
. For lower SDKs, this class aims to behave as close as possible to the original implementation.
Summary
Nested classes | |
---|---|
abstract |
Listener to be notified when the set of controllable |
Constants | |
---|---|
static Int |
Option for |
static Int |
The default option for |
static Int |
Option for |
Public constructors | |
---|---|
Public methods | |
---|---|
Unit |
addOnControllableInsetsChangedListener(@NonNull listener: WindowInsetsControllerCompat.OnControllableInsetsChangedListener) Adds a |
Unit |
controlWindowInsetsAnimation(types: Int, durationMillis: Long, @Nullable interpolator: Interpolator?, @Nullable cancellationSignal: CancellationSignal?, @NonNull listener: WindowInsetsAnimationControlListenerCompat) Lets the application control window inset animations in a frame-by-frame manner by modifying the position of the windows in the system causing insets directly using |
Int |
Retrieves the requested behavior of system bars. |
Unit |
Makes a set of windows causing insets disappear. |
Boolean |
Checks if the foreground of the navigation bar is set to light. |
Boolean |
Checks if the foreground of the status bar is set to light. |
Unit |
removeOnControllableInsetsChangedListener(@NonNull listener: WindowInsetsControllerCompat.OnControllableInsetsChangedListener) Removes a |
Unit |
If true, changes the foreground color of the navigation bars to light so that the items on the bar can be read clearly. |
Unit |
setAppearanceLightStatusBars(isLight: Boolean) If true, changes the foreground color of the status bars to light so that the items on the bar can be read clearly. |
Unit |
setSystemBarsBehavior(behavior: Int) Controls the behavior of system bars. |
Unit |
Makes a set of windows that cause insets appear on screen. |
static WindowInsetsControllerCompat |
toWindowInsetsControllerCompat(@NonNull insetsController: WindowInsetsController) Wrap a |
Constants
BEHAVIOR_SHOW_BARS_BY_SWIPE
static val BEHAVIOR_SHOW_BARS_BY_SWIPE: Int
Option for setSystemBarsBehavior(int)
: Window would like to remain interactive when hiding navigation bars by calling hide(int)
or WindowInsetsAnimationControllerCompat#setInsetsAndAlpha(Insets, float, float)
.
When system bars are hidden in this mode, they can be revealed with system gestures, such as swiping from the edge of the screen where the bar is hidden from.
Value: 1
BEHAVIOR_SHOW_BARS_BY_TOUCH
static val BEHAVIOR_SHOW_BARS_BY_TOUCH: Int
The default option for setSystemBarsBehavior(int)
. System bars will be forcibly shown on any user interaction on the corresponding display if navigation bars are hidden by hide(int)
or WindowInsetsAnimationControllerCompat#setInsetsAndAlpha(Insets, float, float)
.
Value: 0
BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
static val BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE: Int
Option for setSystemBarsBehavior(int)
: Window would like to remain interactive when hiding navigation bar