ResourceBuilders.ImageResource

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

Public methods

static @NonNull ResourceBuilders.ImageResource.Builder

Returns a new Builder.

@Nullable ResourceBuilders.AndroidImageResourceByResId

Gets an image resource that maps to an Android drawable by resource ID.

@Nullable ResourceBuilders.InlineImageResource

Gets an image resource that contains the image data inline.

Public methods

builder

@NonNull
public static ResourceBuilders.ImageResource.Builder builder()

Returns a new Builder.

getAndroidResourceByResId

@Nullable
@NonNull
public ResourceBuilders.AndroidImageResourceByResId getAndroidResourceByResId()

Gets an image resource that maps to an Android drawable by resource ID. Intended for testing purposes only.

getInlineResource

@Nullable
@NonNull
public ResourceBuilders.InlineImageResource getInlineResource()

Gets an image resource that contains the image data inline. Intended for testing purposes only.