java.lang.Object | |
↳ | android.graphics.drawable.Drawable.ConstantState |
Known Direct Subclasses |
This abstract class is used by 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.
getConstantState()
to retrieve the ConstantState of a Drawable. Calling
mutate()
on a Drawable should typically create a new ConstantState for that
Drawable.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return a bit mask of configuration changes that will impact
this drawable (and thus require completely reloading it).
| |||||||||||
Create a new drawable without supplying resources the caller
is running in.
| |||||||||||
Create a new Drawable instance from its constant state.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Return a bit mask of configuration changes that will impact this drawable (and thus require completely reloading it).
Create a new drawable without supplying resources the caller
is running in. Note that using this means the density-dependent
drawables (like bitmaps) will not be able to update their target
density correctly. One should use newDrawable(Resources)
instead to provide a resource.
Create a new Drawable instance from its constant state. This must be implemented for drawables that change based on the target density of their caller (that is depending on whether it is in compatibility mode).