ResourceBuilders.ImageResource
@RequiresSchemaVersion(major = 1, minor = 0)
public final class ResourceBuilders.ImageResource
An image resource, which can be used by layouts. This holds multiple underlying resource types, which the underlying runtime will pick according to what it thinks is appropriate.
Summary
Nested types |
|---|
public final class ResourceBuilders.ImageResource.BuilderBuilder for |
Public methods |
|
|---|---|
boolean |
|
@Nullable ResourceBuilders.AndroidAnimatedImageResourceByResId |
Gets a non-seekable animated image resource that maps to an Android drawable by resource ID. |
@Nullable ResourceBuilders.AndroidLottieResourceByResId |
Gets a Lottie resource that is read from a raw Android resource ID. |
@Nullable ResourceBuilders.AndroidImageResourceByResId |
Gets an image resource that maps to an Android drawable by resource ID. |
@Nullable ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId |
Gets a seekable animated image resource that maps to an Android drawable by resource ID. |
@Nullable ResourceBuilders.InlineImageResource |
Gets an image resource that contains the image data inline. |
int |
hashCode() |
@NonNull String |
toString() |
Public methods
getAndroidAnimatedResourceByResId
@ProtoLayoutExperimental
public @Nullable ResourceBuilders.AndroidAnimatedImageResourceByResId getAndroidAnimatedResourceByResId()
Gets 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.
getAndroidLottieResourceByResId
public @Nullable ResourceBuilders.AndroidLottieResourceByResId getAndroidLottieResourceByResId()
Gets a Lottie resource that is read from a raw Android resource ID.
getAndroidResourceByResId
public @Nullable ResourceBuilders.AndroidImageResourceByResId getAndroidResourceByResId()
Gets an image resource that maps to an Android drawable by resource ID.
getAndroidSeekableAnimatedResourceByResId
@ProtoLayoutExperimental
public @Nullable ResourceBuilders.AndroidSeekableAnimatedImageResourceByResId getAndroidSeekableAnimatedResourceByResId()
Gets a seekable animated image resource that maps to an Android drawable by resource ID. The animation progress is bound to the provided dynamic float.
getInlineResource
public @Nullable ResourceBuilders.InlineImageResource getInlineResource()
Gets an image resource that contains the image data inline.