ResourceBuilders.ImageResource.Builder
class ResourceBuilders.ImageResource.Builder
Builder for ImageResource
Summary
Public functions
build
fun build(): ResourceBuilders.ImageResource
Builds an instance from accumulated values.
setAndroidAnimatedResourceByResId
@RequiresSchemaVersion(major = 1, minor = 200)
@ProtoLayoutExperimental
fun setAndroidAnimatedResourceByResId(
androidAnimatedResourceByResId: ResourceBuilders.AndroidAnimatedImageResourceByResId
): ResourceBuilders.ImageResource.Builder
Sets a non-seekable animated image resource that maps to an Android drawable by resource ID. The animation is started with given trigger, fire and forget.
setAndroidLottieResourceByResId
@RequiresSchemaVersion(major = 1, minor = 500)
fun setAndroidLottieResourceByResId(
androidLottieResourceByResId: ResourceBuilders.AndroidLottieResourceByResId
): ResourceBuilders.ImageResource.Builder
sets a Lottie resource that is read from a raw Android resource ID.
setAndroidResourceByResId
@RequiresSchemaVersion(major = 1, minor = 0)
fun setAndroidResourceByResId(
androidResourceByResId: ResourceBuilders.AndroidImageResourceByResId
): ResourceBuilders.ImageResource.Builder
Sets an image resource that maps to an Android drawable by resource ID.
setAndroidSeekableAnimatedResourceByResId
@RequiresSchemaVersion(major = 1, minor = 200)
@ProtoLayoutExperimental
fun setAndroidSeekableAnimatedResourceByResId(
androidSeekableAnimatedResourceByResId: ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId
): ResourceBuilders.ImageResource.Builder
Sets a seekable animated image resource that maps to an Android drawable by resource ID. The animation progress is bound to the provided dynamic float.
setInlineResource
@RequiresSchemaVersion(major = 1, minor = 0)
fun setInlineResource(inlineResource: ResourceBuilders.InlineImageResource): ResourceBuilders.ImageResource.Builder
Sets an image resource that contains the image data inline.