ResourceBuilders.AndroidLottieResourceByResId.Builder


class ResourceBuilders.AndroidLottieResourceByResId.Builder


Builder for AndroidLottieResourceByResId

Summary

Public constructors

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

Creates an instance of Builder.

Public functions

ResourceBuilders.AndroidLottieResourceByResId

Builds an instance from accumulated values.

ResourceBuilders.AndroidLottieResourceByResId.Builder
@RequiresSchemaVersion(major = 1, minor = 500)
setProgress(progress: DynamicBuilders.DynamicFloat)

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-alpha03
@RequiresSchemaVersion(major = 1, minor = 500)
Builder(@RawRes resourceId: Int)

Creates an instance of Builder.

Parameters
@RawRes resourceId: Int

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

Public functions

build

Added in 1.3.0-alpha03
fun build(): ResourceBuilders.AndroidLottieResourceByResId

Builds an instance from accumulated values.

setProgress

Added in 1.3.0-alpha03
@RequiresSchemaVersion(major = 1, minor = 500)
fun setProgress(progress: DynamicBuilders.DynamicFloat): 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.

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.