DrawableContainer.DrawableContainerState


public static abstract class DrawableContainer.DrawableContainerState
extends Drawable.ConstantState

java.lang.Object
   ↳ android.graphics.drawable.Drawable.ConstantState
     ↳ android.graphics.drawable.DrawableContainer.DrawableContainerState


A ConstantState that can contain several Drawables. This class was made public to enable testing, and its visibility may change in a future release.

Summary

Public methods

final int addChild(Drawable dr)

Adds the drawable to the end of the list of contained drawables.

boolean canApplyTheme()

Return whether this constant state can have a theme applied.

boolean canConstantState()
int getChangingConfigurations()

Return a bit mask of configuration changes that will impact this drawable (and thus require completely reloading it).

final Drawable getChild(int index)
final int getChildCount()
final Drawable[] getChildren()
final int getConstantHeight()
final int getConstantMinimumHeight()
final int getConstantMinimumWidth()
final Rect getConstantPadding()
final int getConstantWidth()
final int getEnterFadeDuration()
final int getExitFadeDuration()
final int getOpacity()
void growArray(int oldSize, int newSize)
final boolean isConstantSize()
final boolean isStateful()
final void setConstantSize(boolean constant)
final void setEnterFadeDuration(int duration)
final void setExitFadeDuration(int duration)
final void setVariablePadding(boolean variable)

A boolean value indicating whether to use the maximum padding value of all frames in the set (false), or to use the padding value of the frame being shown (true).

Protected methods

void computeConstantSize()

Inherited methods

boolean canApplyTheme()

Return whether this constant state can have a theme applied.

abstract int getChangingConfigurations()

Return a bit mask of configuration changes that will impact this drawable (and thus require completely reloading it).

Drawable newDrawable(Resources res)

Creates a new Drawable instance from its constant state using the specified resources.

abstract Drawable newDrawable()

Creates a new Drawable instance from its constant state.

Drawable newDrawable(Resources res, Resources.Theme theme)

Creates a new Drawable instance from its constant state using the specified resources and theme.

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public methods

addChild

Added in API level 1
public final int addChild (Drawable dr)

Adds the drawable to the end of the list of contained drawables.

Parameters
dr Drawable: the drawable to add

Returns
int the position of the drawable within the container

canApplyTheme

Added in API level 21
public boolean canApplyTheme ()

Return whether this constant state can have a theme applied.

Returns
boolean

canConstantState

Added in API level 1
public boolean canConstantState ()

Returns
boolean

getChangingConfigurations

Added in API level 1
public int getChangingConfigurations ()

Return a bit mask of configuration changes that will impact this drawable (and thus require completely reloading it).

getChild

Added in API level 19
public final Drawable getChild (int index)

Parameters
index int

Returns
Drawable

getChildCount

Added in API level 1
public final int getChildCount ()

Returns
int

getChildren

Added in API level 1
public final Drawable[] getChildren ()

Returns
Drawable[]

getConstantHeight

Added in API level 1
public final int getConstantHeight ()

Returns
int

getConstantMinimumHeight

Added in API level 1
public final int getConstantMinimumHeight ()

Returns
int

getConstantMinimumWidth

Added in API level 1
public final int getConstantMinimumWidth ()

Returns
int

getConstantPadding

Added in API level 1
public final Rect getConstantPadding ()

Returns
Rect

getConstantWidth

Added in API level 1
public final int getConstantWidth ()

Returns
int

getEnterFadeDuration

Added in API level 11
public final int getEnterFadeDuration ()

Returns
int

getExitFadeDuration

Added in API level 11
public final int getExitFadeDuration ()

Returns
int

getOpacity

Added in API level 1
public final int getOpacity ()

Returns
int

growArray

Added in API level 1
public void growArray (int oldSize, 
                int newSize)

Parameters
oldSize int

newSize int

isConstantSize

Added in API level 1
public final boolean isConstantSize ()

Returns
boolean

isStateful

Added in API level 1
public final boolean isStateful ()

Returns
boolean

setConstantSize

Added in API level 1
public final void setConstantSize (boolean constant)

Parameters
constant boolean

setEnterFadeDuration

Added in API level 11
public final void setEnterFadeDuration (int duration)

Parameters
duration int

setExitFadeDuration

Added in API level 11
public final void setExitFadeDuration (int duration)

Parameters
duration int

setVariablePadding

Added in API level 1
public final void setVariablePadding (boolean variable)

A boolean value indicating whether to use the maximum padding value of all frames in the set (false), or to use the padding value of the frame being shown (true). Default value is false.

Parameters
variable boolean

Protected methods

computeConstantSize

Added in API level 11
protected void computeConstantSize ()