CacheBitmapLoader


@UnstableApi
class CacheBitmapLoader : BitmapLoader


A BitmapLoader that caches the result of the last decodeBitmap or loadBitmap request. Requests are fulfilled from the last bitmap load request when the last bitmap is requested from the same data or the last bitmap is requested from the same uri. If it's not the above two cases, the request is forwarded to the provided and the result is cached.

Summary

Public constructors

Creates an instance that is able to cache the last bitmap load request to the given bitmap loader.

Public functions

ListenableFuture<Bitmap!>!

Decodes an image from compressed binary data.

ListenableFuture<Bitmap!>!
loadBitmap(uri: Uri!)

Loads an image from uri.

Boolean

Returns whether the given mimeType is supported.

Public constructors

CacheBitmapLoader

CacheBitmapLoader(bitmapLoader: BitmapLoader!)

Creates an instance that is able to cache the last bitmap load request to the given bitmap loader.

Public functions

decodeBitmap

fun decodeBitmap(data: ByteArray!): ListenableFuture<Bitmap!>!

Decodes an image from compressed binary data.

loadBitmap

fun loadBitmap(uri: Uri!): ListenableFuture<Bitmap!>!

Loads an image from uri.

supportsMimeType

fun supportsMimeType(mimeType: String!): Boolean

Returns whether the given mimeType is supported.