ResourceBuilders.ImageResource.Builder
public final class ResourceBuilders.ImageResource.Builder
Builder for ImageResource
Summary
Public methods
build
public @NonNull ResourceBuilders.ImageResource build()
Builds an instance from accumulated values.
setAndroidAnimatedResourceByResId
@RequiresSchemaVersion(major = 1, minor = 200)
@ProtoLayoutExperimental
public @NonNull ResourceBuilders.ImageResource.Builder setAndroidAnimatedResourceByResId(
@NonNull ResourceBuilders.AndroidAnimatedImageResourceByResId androidAnimatedResourceByResId
)
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)
public @NonNull ResourceBuilders.ImageResource.Builder setAndroidLottieResourceByResId(
@NonNull ResourceBuilders.AndroidLottieResourceByResId androidLottieResourceByResId
)
sets a Lottie resource that is read from a raw Android resource ID.
setAndroidResourceByResId
@RequiresSchemaVersion(major = 1, minor = 0)
public @NonNull ResourceBuilders.ImageResource.Builder setAndroidResourceByResId(
@NonNull ResourceBuilders.AndroidImageResourceByResId androidResourceByResId
)
Sets an image resource that maps to an Android drawable by resource ID.
setAndroidSeekableAnimatedResourceByResId
@RequiresSchemaVersion(major = 1, minor = 200)
@ProtoLayoutExperimental
public @NonNull ResourceBuilders.ImageResource.Builder setAndroidSeekableAnimatedResourceByResId(
@NonNull ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId androidSeekableAnimatedResourceByResId
)
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)
public @NonNull ResourceBuilders.ImageResource.Builder setInlineResource(
@NonNull ResourceBuilders.InlineImageResource inlineResource
)
Sets an image resource that contains the image data inline.