# WindowInsetsAnimationCompat.BoundsCompat

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/WindowInsetsAnimationCompat.java+class:androidx.core.view.WindowInsetsAnimationCompat.BoundsCompat) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)

*** ** * ** ***

<br />

```
class WindowInsetsAnimationCompat.BoundsCompat
```

<br />

*** ** * ** ***

Class representing the range of an `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat`

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat.BoundsCompat#BoundsCompat(androidx.core.graphics.Insets,androidx.core.graphics.Insets)(lowerBound: https://developer.android.com/reference/kotlin/androidx/core/graphics/Insets, upperBound: https://developer.android.com/reference/kotlin/androidx/core/graphics/Insets)` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/graphics/Insets` | `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat.BoundsCompat#getLowerBound()()` Queries the lower inset bound of the animation. |
| `https://developer.android.com/reference/kotlin/androidx/core/graphics/Insets` | `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat.BoundsCompat#getUpperBound()()` Queries the upper inset bound of the animation. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat.BoundsCompat` | `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat.BoundsCompat#inset(androidx.core.graphics.Insets)(insets: https://developer.android.com/reference/kotlin/androidx/core/graphics/Insets)` Insets both the lower and upper bound by the specified insets. |
| `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresApi(value = 30) https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat.BoundsCompat#toBounds()()` Creates a new instance of `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds.html` from this compat instance. |
| `java-static https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat.BoundsCompat` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresApi(value = 30) https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat.BoundsCompat#toBoundsCompat(android.view.WindowInsetsAnimation.Bounds)(bounds: https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds.html)` Create a new insance of `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat.BoundsCompat` using the provided platform `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds.html`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat.BoundsCompat#toString()()` |

## Public constructors

### BoundsCompat

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)

```
BoundsCompat(lowerBound: Insets, upperBound: Insets)
```

## Public functions

### getLowerBound

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)

```
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 `https://developer.android.com/reference/kotlin/androidx/core/graphics/Insets#NONE()` and the upper bound is the same as `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat#getInsets(int)` for the fully shown state. This is the same as `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationControllerCompat#getHiddenStateInsets()` and `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationControllerCompat#getShownStateInsets()` in case the listener gets invoked because of an animation that originates from `https://developer.android.com/reference/kotlin/androidx/core/view/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.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat.BoundsCompat#getUpperBound()` |   |
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationControllerCompat#getHiddenStateInsets()` |   |

### getUpperBound

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)

```
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 `https://developer.android.com/reference/kotlin/androidx/core/graphics/Insets#NONE()` nd the upper bound is the same as `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat#getInsets(int)` for the fully shown state. This is the same as `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationControllerCompat#getHiddenStateInsets()` and `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationControllerCompat#getShownStateInsets()` in case the listener gets invoked because of an animation that originates from `https://developer.android.com/reference/kotlin/androidx/core/view/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.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat.BoundsCompat#getLowerBound()` |   |
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationControllerCompat#getShownStateInsets()` |   |

### inset

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)

```
fun inset(insets: Insets): WindowInsetsAnimationCompat.BoundsCompat
```

Insets both the lower and upper bound by the specified insets. This is to be used in `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat.Callback#onStart(androidx.core.view.WindowInsetsAnimationCompat,androidx.core.view.WindowInsetsAnimationCompat.BoundsCompat)` 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: https://developer.android.com/reference/kotlin/androidx/core/graphics/Insets` | The amount to inset. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat.BoundsCompat` | A copy of this instance inset in the given directions. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat#inset(androidx.core.graphics.Insets)` |   |
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat.Callback#onStart(androidx.core.view.WindowInsetsAnimationCompat,androidx.core.view.WindowInsetsAnimationCompat.BoundsCompat)` |   |

### toBounds

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)

```
@RequiresApi(value = 30)
fun toBounds(): WindowInsetsAnimation.Bounds
```

Creates a new instance of `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds.html` from this compat instance.

### toBoundsCompat

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)

```
@RequiresApi(value = 30)
java-static fun toBoundsCompat(bounds: WindowInsetsAnimation.Bounds): WindowInsetsAnimationCompat.BoundsCompat
```

Create a new insance of `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat.BoundsCompat` using the provided platform `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds.html`.

### toString

```
fun toString(): String!
```