# EmbeddingAnimationBackground

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

*** ** * ** ***


```
public abstract class EmbeddingAnimationBackground
```

<br />

Known direct subclasses [EmbeddingAnimationBackground.ColorBackground](https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground.ColorBackground)

|---|---|
| `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground.ColorBackground` | An {@link EmbeddingAnimationBackground} to specify of using a developer-defined color as the animation background. |

*** ** * ** ***

Background to be used for window transition animations for embedding activities if the animation requires a background.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationParams#animationBackground()` |   |

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground.ColorBackground extends https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground` An {@link EmbeddingAnimationBackground} to specify of using a developer-defined color as the animation background. |

| ### Public fields |
|---|---|
| `static 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/EmbeddingAnimationBackground#DEFAULT()` The special `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground` to represent the default value, which means to use the current theme window background color. |

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground.ColorBackground` | `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground#createColorBackground(kotlin.Int)( @https://developer.android.com/reference/androidx/annotation/IntRange(from = -16777216, to = -1) @https://developer.android.com/reference/androidx/annotation/ColorInt int color )` Creates a `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground.ColorBackground` to represent the given `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground.Companion#createColorBackground(kotlin.Int)`. |

## Public fields

### DEFAULT

```
public static final @NonNull EmbeddingAnimationBackground DEFAULT
```

The special `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground` to represent the default value, which means to use the current theme window background color.

## Public methods

### createColorBackground

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

```
public static final @NonNull EmbeddingAnimationBackground.ColorBackground createColorBackground(
    @IntRange(from = -16777216, to = -1) @ColorInt int color
)
```

Creates a `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground.ColorBackground` to represent the given `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground.Companion#createColorBackground(kotlin.Int)`.

Only opaque color is supported.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/IntRange(from = -16777216, to = -1) @https://developer.android.com/reference/androidx/annotation/ColorInt int color` | `https://developer.android.com/reference/androidx/annotation/ColorInt` of an opaque color. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground.ColorBackground` | the `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground.ColorBackground` representing the `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground.Companion#createColorBackground(kotlin.Int)`. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if the `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground.Companion#createColorBackground(kotlin.Int)` is not opaque. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground#DEFAULT()` | for the default value, which means to use the current theme window background color. |