EmbeddingAnimationParams.Builder


class EmbeddingAnimationParams.Builder


Builder for creating an instance of EmbeddingAnimationParams.

Summary

Public constructors

Public functions

EmbeddingAnimationParams

Builds an EmbeddingAnimationParams instance with the attributes specified by the builder's setters.

EmbeddingAnimationParams.Builder

Sets the animation background.

EmbeddingAnimationParams.Builder

Sets the change (resize or move) animation.

EmbeddingAnimationParams.Builder

Sets the close animation.

EmbeddingAnimationParams.Builder

Sets the open animation.

Public constructors

Builder

Added in 1.4.0
Builder()

Public functions

build

Added in 1.4.0
fun build(): EmbeddingAnimationParams

Builds an EmbeddingAnimationParams instance with the attributes specified by the builder's setters.

Returns
EmbeddingAnimationParams

the new EmbeddingAnimationParams instance.

setAnimationBackground

Added in 1.4.0
@RequiresWindowSdkExtension(version = 5)
fun setAnimationBackground(background: EmbeddingAnimationBackground): EmbeddingAnimationParams.Builder

Sets the animation background.

The default is to use the current theme window background color.

This can be supported only if the Window Extensions version of the target device is equals or higher than required API level. Otherwise, it would be no-op.

Parameters
background: EmbeddingAnimationBackground

the animation background.

Returns
EmbeddingAnimationParams.Builder

this Builder.

setChangeAnimation

Added in 1.5.0-alpha02
@RequiresWindowSdkExtension(version = 7)
fun setChangeAnimation(spec: EmbeddingAnimationParams.AnimationSpec): EmbeddingAnimationParams.Builder

Sets the change (resize or move) animation.

The default is to use the system animation.

This can be supported only if the Window Extensions version of the target device is equals or higher than required API level. Otherwise, it would be no-op.

Parameters
spec: EmbeddingAnimationParams.AnimationSpec

the animation spec

Returns
EmbeddingAnimationParams.Builder

this Builder.

setCloseAnimation

Added in 1.5.0-alpha02
@RequiresWindowSdkExtension(version = 7)
fun setCloseAnimation(spec: EmbeddingAnimationParams.AnimationSpec): EmbeddingAnimationParams.Builder

Sets the close animation.

The default is to use the system animation.

This can be supported only if the Window Extensions version of the target device is equals or higher than required API level. Otherwise, it would be no-op.

Parameters
spec: EmbeddingAnimationParams.AnimationSpec

the animation transition spec

Returns
EmbeddingAnimationParams.Builder

this Builder.

setOpenAnimation

Added in 1.5.0-alpha02
@RequiresWindowSdkExtension(version = 7)
fun setOpenAnimation(spec: EmbeddingAnimationParams.AnimationSpec): EmbeddingAnimationParams.Builder

Sets the open animation.

The default is to use the system animation.

This can be supported only if the Window Extensions version of the target device is equals or higher than required API level. Otherwise, it would be no-op.

Parameters
spec: EmbeddingAnimationParams.AnimationSpec

the animation transition spec

Returns
EmbeddingAnimationParams.Builder

this Builder.