WindowInsetsAnimationCompat.BoundsCompat

Added in 1.5.0

public final class WindowInsetsAnimationCompat.BoundsCompat


Class representing the range of an WindowInsetsAnimationCompat

Summary

Public constructors

BoundsCompat(@NonNull Insets lowerBound, @NonNull Insets upperBound)

Public methods

@NonNull Insets

Queries the lower inset bound of the animation.

@NonNull Insets

Queries the upper inset bound of the animation.

@NonNull WindowInsetsAnimationCompat.BoundsCompat
inset(@NonNull Insets insets)

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

@NonNull WindowInsetsAnimation.Bounds
@RequiresApi(value = 30)
toBounds()

Creates a new instance of WindowInsetsAnimation.Bounds from this compat instance.

static @NonNull WindowInsetsAnimationCompat.BoundsCompat

Create a new insance of BoundsCompat using the provided platform android.view.WindowInsetsAnimation.Bounds.

String

Public constructors

BoundsCompat

Added in 1.5.0
public BoundsCompat(@NonNull Insets lowerBound, @NonNull Insets upperBound)

Public methods

getLowerBound

Added in 1.5.0
public @NonNull Insets getLowerBound()

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 NONE and the upper bound is the same as getInsets for the fully shown state. This is the same as getHiddenStateInsets and getShownStateInsets in case the listener gets invoked because of an animation that originates from WindowInsetsAnimationControllerCompat.

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.

getUpperBound

Added in 1.5.0
public @NonNull Insets getUpperBound()

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 NONE nd the upper bound is the same as getInsets for the fully shown state. This is the same as getHiddenStateInsets and getShownStateInsets in case the listener gets invoked because of an animation that originates from WindowInsetsAnimationControllerCompat.

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.

inset

Added in 1.5.0
public @NonNull WindowInsetsAnimationCompat.BoundsCompat inset(@NonNull Insets insets)

Insets both the lower and upper bound by the specified insets. This is to be used in 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
@NonNull Insets insets

The amount to inset.

Returns
@NonNull WindowInsetsAnimationCompat.BoundsCompat

A copy of this instance inset in the given directions.

toBounds

Added in 1.5.0
@RequiresApi(value = 30)
public @NonNull WindowInsetsAnimation.Bounds toBounds()

Creates a new instance of WindowInsetsAnimation.Bounds from this compat instance.

toBoundsCompat

Added in 1.5.0
@RequiresApi(value = 30)
public static @NonNull WindowInsetsAnimationCompat.BoundsCompat toBoundsCompat(@NonNull WindowInsetsAnimation.Bounds bounds)

Create a new insance of BoundsCompat using the provided platform android.view.WindowInsetsAnimation.Bounds.

toString

public String toString()