Added in API level 30

Bounds


class Bounds
kotlin.Any
   ↳ android.view.WindowInsetsAnimation.Bounds

Class representing the range of an WindowInsetsAnimation

Summary

Public constructors
Bounds(lowerBound: Insets, upperBound: Insets)

Public methods
Insets

Queries the lower inset bound of the animation.

Insets

Queries the upper inset bound of the animation.

WindowInsetsAnimation.Bounds
inset(insets: Insets)

Insets both the lower and upper bound by the specified insets.

String

Public constructors

Bounds

Added in API level 30
Bounds(
    lowerBound: Insets,
    upperBound: Insets)
Parameters
lowerBound Insets: This value cannot be null.
upperBound Insets: This value cannot be null.

Public methods

getLowerBound

Added in API level 30
fun getLowerBound(): Insets

Queries the lower inset bound of the animation. If the animation is about showing or hiding a window that cause insets, the lower bound is Insets.NONE and the upper bound is the same as WindowInsets.getInsets(int) for the fully shown state. This is the same as WindowInsetsAnimationController.getHiddenStateInsets and WindowInsetsAnimationController.getShownStateInsets in case the listener gets invoked because of an animation that originates from WindowInsetsAnimationController.

However, if the size of a window that causes insets is changing, these are the lower/upper bounds of that size animation.

There are no overlapping animations for a specific type, but there may be multiple animations running at the same time for different inset types.
Return
Insets This value cannot be null.

getUpperBound

Added in API level 30
fun getUpperBound(): Insets

Queries the upper inset bound of the animation. If the animation is about showing or hiding a window that cause insets, the lower bound is Insets.NONE nd the upper bound is the same as WindowInsets.getInsets(int) for the fully shown state. This is the same as WindowInsetsAnimationController.getHiddenStateInsets and WindowInsetsAnimationController.getShownStateInsets in case the listener gets invoked because of an animation that originates from WindowInsetsAnimationController.

However, if the size of a window that causes insets is changing, these are the lower/upper bounds of that size animation.

There are no overlapping animations for a specific type, but there may be multiple animations running at the same time for different inset types.

Return
Insets This value cannot be null.

inset

Added in API level 30
fun inset(insets: Insets): WindowInsetsAnimation.Bounds

Insets both the lower and upper bound by the specified insets. This is to be used in Callback.onStart to indicate that a part of the insets has been used to offset or clip its children, and the children shouldn't worry about that part anymore.

Parameters
insets Insets: The amount to inset. This value cannot be null.
Return
WindowInsetsAnimation.Bounds A copy of this instance inset in the given directions. This value cannot be null.

toString

Added in API level 30
fun toString(): String
Return
String a string representation of the object.