public abstract class ConstantState<T> extends Object
Resources.Theme
or Configuration
.
A constant state should be able to return a bitmask of changing configurations, which
identifies the type of configuration changes that may invalidate this resource. These
configuration changes can be obtained from TypedValue
. Entities such as
Animator
also provide a changing configuration method to include
their dependencies (e.g. An AnimatorSet's changing configuration is the union of the
changing configurations of each Animator in the set)
Constructor and Description |
---|
ConstantState() |
Modifier and Type | Method and Description |
---|---|
abstract int |
getChangingConfigurations()
Return a bit mask of configuration changes that will impact
this resource (and thus require completely reloading it).
|
abstract T |
newInstance()
Create a new instance without supplying resources the caller
is running in.
|
T |
newInstance(Resources res)
Create a new instance from its constant state.
|
T |
newInstance(Resources res,
Resources.Theme theme)
Create a new instance from its constant state.
|
public abstract int getChangingConfigurations()
public abstract T newInstance()
public T newInstance(Resources res)
public T newInstance(Resources res, Resources.Theme theme)