T
- type of the wrapped Drawable
public abstract class DrawableResource<T extends Drawable> extends Object implements Resource<T>
Drawable
which returns a
new drawable
based on it's state
.
Suggested usages only include T
s where the new drawable is of the same or descendant class.Constructor and Description |
---|
DrawableResource(T drawable) |
public DrawableResource(T drawable)
public final T get()
Resource
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,
Drawable
s should only be used by a single
View
at a time so each call to this method for Resources that wrap
Drawable
s should always return a new
Drawable
.