ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId


@RequiresSchemaVersion(major = 1, minor = 200)
@ProtoLayoutExperimental
public final class ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId


A seekable animated image resource that maps to an Android drawable by resource ID. The animation progress is bound to the provided dynamic float.

Summary

Public methods

int

Gets the format for the animated image.

@Nullable DynamicBuilders.DynamicFloat

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

@DrawableRes int

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

@NonNull String

Public methods

getAnimatedImageFormat

Added in 1.0.0
public int getAnimatedImageFormat()

Gets the format for the animated image.

getProgress

Added in 1.0.0
public @Nullable DynamicBuilders.DynamicFloat getProgress()

Gets 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 (similar to a non-seekable animated).

getResourceId

Added in 1.0.0
public @DrawableRes int getResourceId()

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

toString

public @NonNull String toString()