Most visited

Recently visited

Added in API level 1

DrawableContainer.DrawableContainerState

public static abstract class DrawableContainer.DrawableContainerState
extends Drawable.ConstantState

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


一个ConstantState,可以包含几个Drawable 该课程已公开发布,以便进行测试,并且其未来版本中的知名度可能会发生变化。

Summary

Public methods

final int addChild(Drawable dr)

将drawable添加到包含的可绘制列表的末尾。

boolean canApplyTheme()

返回这个常量状态是否可以应用主题。

boolean canConstantState()
int getChangingConfigurations()

返回将影响此可绘制的配置更改的位掩码(因此需要完全重新加载它)。

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)

一个布尔值,指示是使用集合中所有帧的最大填充值(false)还是使用显示的帧的填充值(true)。

Protected methods

void computeConstantSize()

Inherited methods

From class android.graphics.drawable.Drawable.ConstantState
From class java.lang.Object

Public methods

addChild

Added in API level 1
int addChild (Drawable dr)

将drawable添加到包含的可绘制列表的末尾。

Parameters
dr Drawable: the drawable to add
Returns
int the position of the drawable within the container

canApplyTheme

Added in API level 21
boolean canApplyTheme ()

返回这个常量状态是否可以应用主题。

Returns
boolean

canConstantState

Added in API level 1
boolean canConstantState ()

Returns
boolean

getChangingConfigurations

Added in API level 1
int getChangingConfigurations ()

返回将影响此可绘制的配置更改的位掩码(因此需要完全重新加载它)。

Returns
int

getChild

Added in API level 19
Drawable getChild (int index)

Parameters
index int
Returns
Drawable

getChildCount

Added in API level 1
int getChildCount ()

Returns
int

getChildren

Added in API level 1
Drawable[] getChildren ()

Returns
Drawable[]

getConstantHeight

Added in API level 1
int getConstantHeight ()

Returns
int

getConstantMinimumHeight

Added in API level 1
int getConstantMinimumHeight ()

Returns
int

getConstantMinimumWidth

Added in API level 1
int getConstantMinimumWidth ()

Returns
int

getConstantPadding

Added in API level 1
Rect getConstantPadding ()

Returns
Rect

getConstantWidth

Added in API level 1
int getConstantWidth ()

Returns
int

getEnterFadeDuration

Added in API level 11
int getEnterFadeDuration ()

Returns
int

getExitFadeDuration

Added in API level 11
int getExitFadeDuration ()

Returns
int

getOpacity

Added in API level 1
int getOpacity ()

Returns
int

growArray

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

Parameters
oldSize int
newSize int

isConstantSize

Added in API level 1
boolean isConstantSize ()

Returns
boolean

isStateful

Added in API level 1
boolean isStateful ()

Returns
boolean

setConstantSize

Added in API level 1
void setConstantSize (boolean constant)

Parameters
constant boolean

setEnterFadeDuration

Added in API level 11
void setEnterFadeDuration (int duration)

Parameters
duration int

setExitFadeDuration

Added in API level 11
void setExitFadeDuration (int duration)

Parameters
duration int

setVariablePadding

Added in API level 1
void setVariablePadding (boolean variable)

一个布尔值,指示是使用集合中所有帧的最大填充值(false)还是使用显示的帧的填充值(true)。 默认值为false。

Parameters
variable boolean

Protected methods

computeConstantSize

Added in API level 11
void computeConstantSize ()

Hooray!