BitmapResource

open class BitmapResource : Resource<Z> , Initializable

A resource wrapping a android.graphics.Bitmap object.

Constructors

Link copied to clipboard
open fun BitmapResource(bitmap: Bitmap, bitmapPool: BitmapPool)

Functions

Link copied to clipboard
open fun get(): Bitmap
Returns an instance of the wrapped resource.
Link copied to clipboard
open fun getResourceClass(): Class<Bitmap>
Returns the Class of the wrapped resource.
Link copied to clipboard
open fun getSize(): Int
Returns the size in bytes of the wrapped resource to use to determine how much of the memory cache this resource uses.
Link copied to clipboard
open fun initialize()
Called on a background thread so the Resource can do some eager initialization.
Link copied to clipboard
open fun obtain(bitmap: Bitmap, bitmapPool: BitmapPool): BitmapResource
Returns a new BitmapResource wrapping the given Bitmap if the Bitmap is non-null or null if the given Bitmap is null.
Link copied to clipboard
open fun recycle()
Cleans up and recycles internal resources.