DefaultInlineImageResourceResolver

public class DefaultInlineImageResourceResolver implements ResourceResolvers.InlineImageResourceResolver


Resource resolver for inline resources.

Summary

Public constructors

Constructor.

Public methods

@Override @NonNull ListenableFuture<@NonNull Drawable>

Get the drawable as specified by {@code resource}.

@NonNull @Override Drawable

Should immediately return the drawable specified by {@code resource}.

Public constructors

DefaultInlineImageResourceResolver

public DefaultInlineImageResourceResolver(@NonNull Context uiContext)

Constructor.

Public methods

getDrawable

@Override
@NonNull
public @Override ListenableFuture<@NonNull DrawablegetDrawable(@NonNull ResourceProto.InlineImageResource inlineImage)

Get the drawable as specified by {@code resource}.

getDrawableOrThrow

@NonNull
@Override
public @Override Drawable getDrawableOrThrow(
    @NonNull ResourceProto.InlineImageResource inlineImage
)

Should immediately return the drawable specified by {@code resource}.

Throws
androidx.wear.tiles.renderer.internal.ResourceResolvers.ResourceAccessException

If the drawable cannot be found, or has to be loaded asynchronously.