EmbeddingAnimationParams.Builder
public final class EmbeddingAnimationParams.Builder
Builder for creating an instance of EmbeddingAnimationParams.
Summary
Public constructors |
|---|
Builder() |
Public methods |
|
|---|---|
final @NonNull EmbeddingAnimationParams |
build()Builds an |
final @NonNull EmbeddingAnimationParams.Builder |
@RequiresWindowSdkExtension(version = 5)Sets the animation background. |
final @NonNull EmbeddingAnimationParams.Builder |
@RequiresWindowSdkExtension(version = 7)Sets the change (resize or move) animation. |
final @NonNull EmbeddingAnimationParams.Builder |
@RequiresWindowSdkExtension(version = 7)Sets the close animation. |
final @NonNull EmbeddingAnimationParams.Builder |
@RequiresWindowSdkExtension(version = 7)Sets the open animation. |
Public methods
build
public final @NonNull EmbeddingAnimationParams build()
Builds an EmbeddingAnimationParams instance with the attributes specified by the builder's setters.
| Returns | |
|---|---|
@NonNull EmbeddingAnimationParams |
the new |
setAnimationBackground
@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 |
| See also | |
|---|---|
EmbeddingAnimationBackground |
setChangeAnimation
@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 |
setCloseAnimation
@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 |
setOpenAnimation
@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 |