Methods Summary |
---|
public void | draw(Canvas canvas)
// overrides from Drawable
if (mCurrDrawable != null) {
mCurrDrawable.draw(canvas);
}
|
public int | getChangingConfigurations()
return super.getChangingConfigurations()
| mDrawableContainerState.mChangingConfigurations
| mDrawableContainerState.mChildrenChangingConfigurations;
|
public ConstantState | getConstantState()
if (mDrawableContainerState.canConstantState()) {
mDrawableContainerState.mChangingConfigurations = super.getChangingConfigurations();
return mDrawableContainerState;
}
return null;
|
public Drawable | getCurrent()
return mCurrDrawable;
|
public int | getIntrinsicHeight()
if (mDrawableContainerState.isConstantSize()) {
return mDrawableContainerState.getConstantHeight();
}
return mCurrDrawable != null ? mCurrDrawable.getIntrinsicHeight() : -1;
|
public int | getIntrinsicWidth()
if (mDrawableContainerState.isConstantSize()) {
return mDrawableContainerState.getConstantWidth();
}
return mCurrDrawable != null ? mCurrDrawable.getIntrinsicWidth() : -1;
|
public int | getMinimumHeight()
if (mDrawableContainerState.isConstantSize()) {
return mDrawableContainerState.getConstantMinimumHeight();
}
return mCurrDrawable != null ? mCurrDrawable.getMinimumHeight() : 0;
|
public int | getMinimumWidth()
if (mDrawableContainerState.isConstantSize()) {
return mDrawableContainerState.getConstantMinimumWidth();
}
return mCurrDrawable != null ? mCurrDrawable.getMinimumWidth() : 0;
|
public int | getOpacity()
return mDrawableContainerState.getOpacity();
|
public boolean | getPadding(Rect padding)
final Rect r = mDrawableContainerState.getConstantPadding();
if (r != null) {
padding.set(r);
return true;
}
if (mCurrDrawable != null) {
return mCurrDrawable.getPadding(padding);
} else {
return super.getPadding(padding);
}
|
public void | invalidateDrawable(Drawable who)
if (who == mCurrDrawable && mCallback != null) {
mCallback.invalidateDrawable(this);
}
|
public boolean | isStateful()
return mDrawableContainerState.isStateful();
|
public Drawable | mutate()
if (!mMutated && super.mutate() == this) {
for (Drawable child : mDrawableContainerState.mDrawables) {
child.mutate();
}
mMutated = true;
}
return this;
|
protected void | onBoundsChange(Rect bounds)
if (mCurrDrawable != null) {
mCurrDrawable.setBounds(bounds);
}
|
protected boolean | onLevelChange(int level)
if (mCurrDrawable != null) {
return mCurrDrawable.setLevel(level);
}
return false;
|
protected boolean | onStateChange(int[] state)
if (mCurrDrawable != null) {
return mCurrDrawable.setState(state);
}
return false;
|
public void | scheduleDrawable(Drawable who, java.lang.Runnable what, long when)
if (who == mCurrDrawable && mCallback != null) {
mCallback.scheduleDrawable(this, what, when);
}
|
public boolean | selectDrawable(int idx)
if (idx == mCurIndex) {
return false;
}
if (idx >= 0 && idx < mDrawableContainerState.mNumChildren) {
Drawable d = mDrawableContainerState.mDrawables[idx];
if (mCurrDrawable != null) {
mCurrDrawable.setVisible(false, false);
}
mCurrDrawable = d;
mCurIndex = idx;
if (d != null) {
d.setVisible(isVisible(), true);
d.setAlpha(mAlpha);
d.setDither(mDither);
d.setColorFilter(mColorFilter);
d.setState(getState());
d.setLevel(getLevel());
d.setBounds(getBounds());
}
} else {
if (mCurrDrawable != null) {
mCurrDrawable.setVisible(false, false);
}
mCurrDrawable = null;
mCurIndex = -1;
}
invalidateSelf();
return true;
|
public void | setAlpha(int alpha)
if (mAlpha != alpha) {
mAlpha = alpha;
if (mCurrDrawable != null) {
mCurrDrawable.setAlpha(alpha);
}
}
|
public void | setColorFilter(ColorFilter cf)
if (mColorFilter != cf) {
mColorFilter = cf;
if (mCurrDrawable != null) {
mCurrDrawable.setColorFilter(cf);
}
}
|
protected void | setConstantState(android.graphics.drawable.DrawableContainer$DrawableContainerState state)
mDrawableContainerState = state;
|
public void | setDither(boolean dither)
if (mDither != dither) {
mDither = dither;
if (mCurrDrawable != null) {
mCurrDrawable.setDither(mDither);
}
}
|
public boolean | setVisible(boolean visible, boolean restart)
boolean changed = super.setVisible(visible, restart);
if (mCurrDrawable != null) {
mCurrDrawable.setVisible(visible, restart);
}
return changed;
|
public void | unscheduleDrawable(Drawable who, java.lang.Runnable what)
if (who == mCurrDrawable && mCallback != null) {
mCallback.unscheduleDrawable(this, what);
}
|