WindowInsetsRulers
sealed interface WindowInsetsRulers
Contains rulers used for window insets. The current
values are available as well as values when
the insets are fully visible
.
Other animation properties can be retrieved with getAnimation
.
Properties
val current: RectRulers
The current values for the window insets RectRulers. Values for some insets may not be
provided on platforms that don't support specific Window Insets types. These also may not be
provided if no WindowInsetsRulers
encroach on the content.
val maximum: RectRulers
The values for the insets when the insets are fully visible. The value does not change when
the insets are hidden. Values for some insets may not be provided on some platforms. For
example, values are never provided for Ime
on Android. These may not be provided if no
WindowInsetsRulers
encroach on the content.
When no animations are active, maximum
and current
will have the same value if
WindowInsetsAnimation.isVisible
is true
. If false
, then maximum
will not be changed,
while current
will have values the same as the Window borders. For example, when a status
bar is visible, its height may be intrude 100 pixels into the Window and maximum
's
top
will be at 100 pixels for StatusBars
. When the status bar is
invisible, maximum
will have the same top
value at 100 pixels, while
current
's top
will be at 0 pixels.
Functions
fun getAnimation(scope: Placeable.PlacementScope): WindowInsetsAnimation
Additional properties related to animating this WindowInsetsRulers
.