public abstract static class Drawable.ConstantState extends Object
Drawable
s to store shared constant state and data
between Drawables. BitmapDrawable
s created from the same resource will for instance
share a unique bitmap stored in their ConstantState.
newDrawable(Resources)
can be used as a factory to create new Drawable instances
from this ConstantState.
Drawable.getConstantState()
to retrieve the ConstantState of a Drawable. Calling
Drawable.mutate()
on a Drawable should typically create a new ConstantState for that
Drawable.Constructor and Description |
---|
Drawable.ConstantState() |
Modifier and Type | Method and Description |
---|---|
abstract int |
getChangingConfigurations()
Return a bit mask of configuration changes that will impact
this drawable (and thus require completely reloading it).
|
abstract Drawable |
newDrawable()
Create a new drawable without supplying resources the caller
is running in.
|
Drawable |
newDrawable(Resources res)
Create a new Drawable instance from its constant state.
|
public abstract Drawable newDrawable()
newDrawable(Resources)
instead to provide a resource.public Drawable newDrawable(Resources res)
public abstract int getChangingConfigurations()