ResourceBuilders.AndroidLottieResourceByResId.Builder


public final class ResourceBuilders.AndroidLottieResourceByResId.Builder


Builder for AndroidLottieResourceByResId

Summary

Public constructors

@RequiresSchemaVersion(major = 1, minor = 500)
Builder(@RawRes int resourceId)

Creates an instance of Builder.

Public methods

@NonNull ResourceBuilders.AndroidLottieResourceByResId

Builds an instance from accumulated values.

@NonNull ResourceBuilders.AndroidLottieResourceByResId.Builder

Sets a androidx.wear.protolayout.expression.DynamicBuilders.DynamicFloat, normally transformed from certain states with the data binding pipeline to control the progress of the animation.

Public constructors

Builder

Added in 1.3.0-alpha05
@RequiresSchemaVersion(major = 1, minor = 500)
public Builder(@RawRes int resourceId)

Creates an instance of Builder.

Parameters
@RawRes int resourceId

the Android resource ID, e.g. R.raw.foo.

Public methods

build

Added in 1.3.0-alpha05
public @NonNull ResourceBuilders.AndroidLottieResourceByResId build()

Builds an instance from accumulated values.

setProgress

Added in 1.3.0-alpha05
@RequiresSchemaVersion(major = 1, minor = 500)
public @NonNull ResourceBuilders.AndroidLottieResourceByResId.Builder setProgress(@NonNull DynamicBuilders.DynamicFloat progress)

Sets a androidx.wear.protolayout.expression.DynamicBuilders.DynamicFloat, normally transformed from certain states with the data binding pipeline to control the progress of the animation.

Its value is required to fall in the range of [0.0, 1.0]. Any values outside this range would be clamped.

When the first value of the arrives, the animation starts from progress 0 to that value. After that it plays from current progress to the new value on subsequent updates.

If not set, the animation will play on load.