Stay organized with collections Save and categorize content based on your preferences.

CacheBitmapLoader

@UnstableApi
public final class CacheBitmapLoader implements 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 methods

ListenableFuture<Bitmap>
decodeBitmap(byte[] data)

Decodes an image from compressed binary data.

ListenableFuture<Bitmap>

Loads an image from uri.

Public constructors

CacheBitmapLoader

public CacheBitmapLoader(BitmapLoader bitmapLoader)

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

Public methods

decodeBitmap

public ListenableFuture<BitmapdecodeBitmap(byte[] data)

Decodes an image from compressed binary data.

loadBitmap

public ListenableFuture<BitmaploadBitmap(Uri uri)

Loads an image from uri.