Known Direct Subclasses
|
Class Overview
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.
Use
getConstantState()
to retrieve the ConstantState of a Drawable. Calling
mutate()
on a Drawable should typically create a new ConstantState for that
Drawable.
Summary
Public Methods |
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.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Called before the object's memory is reclaimed by the VM.
|
final
Class<?>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
|
Public Constructors
public
Drawable.ConstantState
()
Public Methods
public
abstract
int
getChangingConfigurations
()
Return a bit mask of configuration changes that will impact
this drawable (and thus require completely reloading it).
public
abstract
Drawable
newDrawable
()
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).