T- type of the wrapped
public abstract class DrawableResource<T extends Drawable> extends Object implements Resource<T>, Initializable
Drawablewhich returns a
new drawablebased on it's
state. Suggested usages only include
Ts where the new drawable is of the same or descendant class.
|Constructor and Description|
|Modifier and Type||Method and Description|
Returns an instance of the wrapped resource.
Called on a background thread so the
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResourceClass, getSize, recycle
public DrawableResource(T drawable)
public final T get()
Note - This does not have to be the same instance of the wrapped resource class and in fact
it is often appropriate to return a new instance for each call. For example,
Drawables should only be used by a single
View at a time so each call to this method for Resources that wrap
Drawables should always return a new
public void initialize()
Resourcecan do some eager initialization.