DrawableResource

abstract class DrawableResource<T : Drawable?> : Resource<Z> , Initializable

Simple wrapper for an Android Drawable which returns a new drawable based on it's state.

Suggested usages only include Ts where the new drawable is of the same or descendant class.

Parameters

<T>

type of the wrapped Drawable

Constructors

Link copied to clipboard
open fun DrawableResource(drawable: T)

Functions

Link copied to clipboard
fun get(): T
Returns an instance of the wrapped resource.
Link copied to clipboard
abstract fun getResourceClass(): Class<Z>
Returns the Class of the wrapped resource.
Link copied to clipboard
abstract 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
abstract fun recycle()
Cleans up and recycles internal resources.

Inheritors

Link copied to clipboard
Link copied to clipboard