EmbeddingAnimationParams.Builder


public final class EmbeddingAnimationParams.Builder


Builder for creating an instance of EmbeddingAnimationParams.

Summary

Public constructors

Public methods

final @NonNull EmbeddingAnimationParams

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

final @NonNull EmbeddingAnimationParams.Builder

Sets the animation background.

final @NonNull EmbeddingAnimationParams.Builder

Sets the change (resize or move) animation.

final @NonNull EmbeddingAnimationParams.Builder

Sets the close animation.

final @NonNull EmbeddingAnimationParams.Builder

Sets the open animation.

Public constructors

Builder

Added in 1.4.0
public Builder()

Public methods

build

Added in 1.4.0
public final @NonNull EmbeddingAnimationParams build()

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

Returns
@NonNull EmbeddingAnimationParams

the new EmbeddingAnimationParams instance.

setAnimationBackground

Added in 1.4.0
@RequiresWindowSdkExtension(version = 5)
public final @NonNull EmbeddingAnimationParams.Builder setAnimationBackground(@NonNull EmbeddingAnimationBackground background)

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
@NonNull EmbeddingAnimationBackground background

the animation background.

Returns
@NonNull EmbeddingAnimationParams.Builder

this Builder.

setChangeAnimation

Added in 1.5.0-alpha02
@RequiresWindowSdkExtension(version = 7)
public final @NonNull EmbeddingAnimationParams.Builder setChangeAnimation(@NonNull EmbeddingAnimationParams.AnimationSpec spec)

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
@NonNull EmbeddingAnimationParams.AnimationSpec spec

the animation spec

Returns
@NonNull EmbeddingAnimationParams.Builder

this Builder.

setCloseAnimation

Added in 1.5.0-alpha02
@RequiresWindowSdkExtension(version = 7)
public final @NonNull EmbeddingAnimationParams.Builder setCloseAnimation(@NonNull EmbeddingAnimationParams.AnimationSpec spec)

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
@NonNull EmbeddingAnimationParams.AnimationSpec spec

the animation transition spec

Returns
@NonNull EmbeddingAnimationParams.Builder

this Builder.

setOpenAnimation

Added in 1.5.0-alpha02
@RequiresWindowSdkExtension(version = 7)
public final @NonNull EmbeddingAnimationParams.Builder setOpenAnimation(@NonNull EmbeddingAnimationParams.AnimationSpec spec)

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
@NonNull EmbeddingAnimationParams.AnimationSpec spec

the animation transition spec

Returns
@NonNull EmbeddingAnimationParams.Builder

this Builder.