# EmbeddingAnimationParams

Artifact: [androidx.window:window](https://developer.android.com/jetpack/androidx/releases/window) [View Source](https://cs.android.com/search?q=file:androidx/window/embedding/EmbeddingAnimationParams.kt+class:androidx.window.embedding.EmbeddingAnimationParams) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/window#1.4.0)

*** ** * ** ***


```
public final class EmbeddingAnimationParams
```

<br />

*** ** * ** ***

Parameters to be used for window transition animations for embedding activities.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationParams.Builder` |   |
| `https://developer.android.com/reference/androidx/window/embedding/SplitAttributes#animationParams()` |   |
| `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground` |   |
| `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground#createColorBackground(kotlin.Int)` |   |
| `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground#DEFAULT()` |   |

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationParams.AnimationSpec` The animation to use when an activity transitions (e.g. open, close, or change). |
| `public final class https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationParams.Builder` Builder for creating an instance of `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationParams`. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationParams#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` Determines whether this object has the same animation parameters as the compared object. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground` | `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationParams#getAnimationBackground()()` the animation background to use during the animation of the split involving this `EmbeddingAnimationParams` object if the animation requires a background. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationParams.AnimationSpec` | `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationParams#getChangeAnimation()()` the animation spec to use for change transitions (when an activity resizes or moves). |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationParams.AnimationSpec` | `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationParams#getCloseAnimation()()` the animation spec to use for close transitions (when finishing/exiting an activity or when an activity moves to back). |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationParams.AnimationSpec` | `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationParams#getOpenAnimation()()` the animation spec to use for open transitions (when starting/entering an activity or when an activity moves to front). |
| `int` | `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationParams#hashCode()()` Returns a hash code for this `EmbeddingAnimationParams` object. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationParams#toString()()` A string representation of this `EmbeddingAnimationParams` object. |

## Public methods

### equals

```
public boolean equals(Object other)
```

Determines whether this object has the same animation parameters as the compared object.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/Object.html other` | the object to compare to this object. |

| Returns |
|---|---|
| `boolean` | true if the objects have the same animation parameters, false otherwise. |

### getAnimationBackground

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

```
public final @NonNull EmbeddingAnimationBackground getAnimationBackground()
```

the animation background to use during the animation of the split involving this `EmbeddingAnimationParams` object if the animation requires a background. The default is to use the current theme window background color.

### getChangeAnimation

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

```
public final @NonNull EmbeddingAnimationParams.AnimationSpec getChangeAnimation()
```

the animation spec to use for change transitions (when an activity resizes or moves).

### getCloseAnimation

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

```
public final @NonNull EmbeddingAnimationParams.AnimationSpec getCloseAnimation()
```

the animation spec to use for close transitions (when finishing/exiting an activity or when an activity moves to back).

### getOpenAnimation

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

```
public final @NonNull EmbeddingAnimationParams.AnimationSpec getOpenAnimation()
```

the animation spec to use for open transitions (when starting/entering an activity or when an activity moves to front).

### hashCode

```
public int hashCode()
```

Returns a hash code for this `EmbeddingAnimationParams` object.

| Returns |
|---|---|
| `int` | the hash code for this object. |

### toString

```
public @NonNull String toString()
```

A string representation of this `EmbeddingAnimationParams` object.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | the string representation of the object. |