Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds#pubctors) \| [Methods](https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds#inhmethods)

# WindowInsetsAnimation.Bounds

*** ** * ** ***

` public static final class WindowInsetsAnimation.Bounds `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.view.WindowInsetsAnimation.Bounds |

<br />

*** ** * ** ***

Class representing the range of an `https://developer.android.com/reference/android/view/WindowInsetsAnimation`

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds#Bounds(android.graphics.Insets,%20android.graphics.Insets)(https://developer.android.com/reference/android/graphics/Insets lowerBound, https://developer.android.com/reference/android/graphics/Insets upperBound) ` |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/graphics/Insets` | ` https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds#getLowerBound()() ` Queries the lower inset bound of the animation. |
| ` https://developer.android.com/reference/android/graphics/Insets` | ` https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds#getUpperBound()() ` Queries the upper inset bound of the animation. |
| ` https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds` | ` https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds#inset(android.graphics.Insets)(https://developer.android.com/reference/android/graphics/Insets insets) ` Insets both the lower and upper bound by the specified insets. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds#toString()() ` Returns a string representation of the object. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public constructors

### Bounds

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Bounds (Insets lowerBound, 
                Insets upperBound)
```

<br />

<br />

| Parameters ||
|---|---|
| `lowerBound` | `Insets`: This value cannot be `null`. <br /> |
| `upperBound` | `Insets`: This value cannot be `null`. <br /> |

## Public methods

### getLowerBound

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/Insets` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds#getUpperBound()`
- `https://developer.android.com/reference/android/view/WindowInsetsAnimationController#getHiddenStateInsets()`

### getUpperBound

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/Insets` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds#getLowerBound()`
- `https://developer.android.com/reference/android/view/WindowInsetsAnimationController#getShownStateInsets()`

### inset

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsetsAnimation.Bounds inset (Insets insets)
```

Insets both the lower and upper bound by the specified insets. This is to be used in `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Callback#onStart(android.view.WindowInsetsAnimation,%20android.view.WindowInsetsAnimation.Bounds)` 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.

<br />

| Parameters ||
|---|---|
| `insets` | `Insets`: The amount to inset. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds` | A copy of this instance inset in the given directions. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/WindowInsets#inset(android.graphics.Insets)`
- `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Callback#onStart(android.view.WindowInsetsAnimation,%20android.view.WindowInsetsAnimation.Bounds)`

### toString

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |