ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId.Builder


class ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId.Builder


Builder for AndroidSeekableAnimatedImageResourceByResId

Summary

Public constructors

Creates an instance of Builder.

Public functions

ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId

Builds an instance from accumulated values.

ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId.Builder
@RequiresSchemaVersion(major = 1, minor = 200)
setAnimatedImageFormat(animatedImageFormat: Int)

Sets the format for the animated image.

ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId.Builder
@RequiresSchemaVersion(major = 1, minor = 200)
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.

ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId.Builder
@RequiresSchemaVersion(major = 1, minor = 200)
setResourceId(resourceId: @DrawableRes Int)

Sets the Android resource ID, e.g. R.drawable.foo.

Public constructors

Builder

Added in 1.0.0
Builder()

Creates an instance of Builder.

Public functions

build

Added in 1.0.0
fun build(): ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId

Builds an instance from accumulated values.

setAnimatedImageFormat

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun setAnimatedImageFormat(animatedImageFormat: Int): ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId.Builder

Sets the format for the animated image.

setProgress

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun setProgress(progress: DynamicBuilders.DynamicFloat): ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId.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 androidx.wear.protolayout.expression.DynamicBuilders.DynamicFloat 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 (similar to a non-seekable animated).

setResourceId

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun setResourceId(resourceId: @DrawableRes Int): ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId.Builder

Sets the Android resource ID, e.g. R.drawable.foo.