@Override public int getMinimumHeight() { if (mDrawableContainerState.isConstantSize()) { return mDrawableContainerState.getConstantMinimumHeight(); } return mCurrDrawable != null ? mCurrDrawable.getMinimumHeight() : 0; }
@Override public int getIntrinsicHeight() { if (mDrawableContainerState.isConstantSize()) { return mDrawableContainerState.getConstantHeight(); } return mCurrDrawable != null ? mCurrDrawable.getIntrinsicHeight() : -1; }
@Override public ConstantState getConstantState() { if (mDrawableContainerState.canConstantState()) { mDrawableContainerState.mChangingConfigurations = super.getChangingConfigurations(); return mDrawableContainerState; } return null; }
@Override public Drawable mutate() { if (!mMutated && super.mutate() == this) { final int N = mDrawableContainerState.getChildCount(); final Drawable[] drawables = mDrawableContainerState.getChildren(); for (int i = 0; i < N; i++) { if (drawables[i] != null) drawables[i].mutate(); } mMutated = true; } return this; }
@Override public void growArray(int oldSize, int newSize) { super.growArray(oldSize, newSize); final int[][] newStateSets = new int[newSize][]; System.arraycopy(mStateSets, 0, newStateSets, 0, oldSize); mStateSets = newStateSets; }
@Override public void setDither(boolean dither) { if (mDrawableContainerState.mDither != dither) { mDrawableContainerState.mDither = dither; if (mCurrDrawable != null) { mCurrDrawable.setDither(mDrawableContainerState.mDither); } } }
@Override public void growArray(int oldSize, int newSize) { super.growArray(oldSize, newSize); int[] newInts = new int[newSize]; System.arraycopy(mLows, 0, newInts, 0, oldSize); mLows = newInts; newInts = new int[newSize]; System.arraycopy(mHighs, 0, newInts, 0, oldSize); mHighs = newInts; }
@DSGenerator( tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:34:11.148 -0500", hash_original_method = "CF45914111E05D752375948053626E9D", hash_generated_method = "DB8631F608D962E1CC5946A6A27F962A") @Override public void growArray(int oldSize, int newSize) { super.growArray(oldSize, newSize); final int[][] newStateSets = new int[newSize][]; System.arraycopy(mStateSets, 0, newStateSets, 0, oldSize); mStateSets = newStateSets; }
@Override 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); } }
@Override public boolean isStateful() { return mDrawableContainerState.isStateful(); }
@Override public int getOpacity() { return mDrawableContainerState.getOpacity(); }
@Override public int getOpacity() { return mCurrDrawable == null || !mCurrDrawable.isVisible() ? PixelFormat.TRANSPARENT : mDrawableContainerState.getOpacity(); }
/** * Change the global fade duration when a new drawable is leaving the scene. * * @param ms The amount of time to fade in milliseconds. */ public void setExitFadeDuration(int ms) { mDrawableContainerState.mExitFadeDuration = ms; }