# EmbeddingAnimationBackground

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/window/embedding/EmbeddingAnimationBackground "View this page in Java")

<br />

```
abstract class EmbeddingAnimationBackground
```

<br />

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

|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------|
| [EmbeddingAnimationBackground.ColorBackground](https://developer.android.com/reference/kotlin/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                                                                    |
|------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [animationBackground](https://developer.android.com/reference/kotlin/androidx/window/embedding/EmbeddingAnimationParams#animationBackground()) |   |

## Summary

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

|                                                                    ### Public companion functions                                                                     |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [EmbeddingAnimationBackground.ColorBackground](https://developer.android.com/reference/kotlin/androidx/window/embedding/EmbeddingAnimationBackground.ColorBackground) | [createColorBackground](https://developer.android.com/reference/kotlin/androidx/window/embedding/EmbeddingAnimationBackground#createColorBackground(kotlin.Int))`(` ` color: @`[IntRange](https://developer.android.com/reference/kotlin/androidx/annotation/IntRange)`(from = -16777216, to = -1) @`[ColorInt](https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt)` `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) `)` Creates a[ColorBackground](https://developer.android.com/reference/kotlin/androidx/window/embedding/EmbeddingAnimationBackground.ColorBackground)to represent the given[color](https://developer.android.com/reference/kotlin/androidx/window/embedding/EmbeddingAnimationBackground.Companion#createColorBackground(kotlin.Int)). |

|                                                    ### Public companion properties                                                    |
|---------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [EmbeddingAnimationBackground](https://developer.android.com/reference/kotlin/androidx/window/embedding/EmbeddingAnimationBackground) | [DEFAULT](https://developer.android.com/reference/kotlin/androidx/window/embedding/EmbeddingAnimationBackground#DEFAULT()) The special[EmbeddingAnimationBackground](https://developer.android.com/reference/kotlin/androidx/window/embedding/EmbeddingAnimationBackground)to represent the default value, which means to use the current theme window background color. |

## Public companion functions

### createColorBackground

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

```
fun createColorBackground(
    color: @IntRange(from = -16777216, to = -1) @ColorInt Int
): EmbeddingAnimationBackground.ColorBackground
```

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

Only opaque color is supported.  

|                                                                                                                                              Parameters                                                                                                                                               |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|
| `color: @`[IntRange](https://developer.android.com/reference/kotlin/androidx/annotation/IntRange)`(from = -16777216, to = -1) @`[ColorInt](https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt)` `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [ColorInt](https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt)of an opaque color. |

|                                                                                Returns                                                                                |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [EmbeddingAnimationBackground.ColorBackground](https://developer.android.com/reference/kotlin/androidx/window/embedding/EmbeddingAnimationBackground.ColorBackground) | the[ColorBackground](https://developer.android.com/reference/kotlin/androidx/window/embedding/EmbeddingAnimationBackground.ColorBackground)representing the[color](https://developer.android.com/reference/kotlin/androidx/window/embedding/EmbeddingAnimationBackground.Companion#createColorBackground(kotlin.Int)). |

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

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

## Public companion properties

### DEFAULT

```
val DEFAULT: EmbeddingAnimationBackground
```

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