FileDocCategorySizeDatePackage
DrawableWrapper.javaAPI DocAndroid 5.1 API5661Thu Mar 12 22:22:56 GMT 2015android.support.v7.internal.widget

DrawableWrapper

public class DrawableWrapper extends android.graphics.drawable.Drawable implements Drawable.Callback
Base wrapper that delegates all calls to another {@link Drawable}. The wrapped {@link Drawable} must be fully released from any {@link View} before wrapping, otherwise internal {@link Drawable.Callback} may be dropped.

Fields Summary
private android.graphics.drawable.Drawable
mDrawable
Constructors Summary
public DrawableWrapper(android.graphics.drawable.Drawable drawable)

        setWrappedDrawable(drawable);
    
Methods Summary
public voiddraw(android.graphics.Canvas canvas)

        mDrawable.draw(canvas);
    
public intgetChangingConfigurations()

        return mDrawable.getChangingConfigurations();
    
public android.graphics.drawable.DrawablegetCurrent()

        return mDrawable.getCurrent();
    
public intgetIntrinsicHeight()

        return mDrawable.getIntrinsicHeight();
    
public intgetIntrinsicWidth()

        return mDrawable.getIntrinsicWidth();
    
public intgetMinimumHeight()

        return mDrawable.getMinimumHeight();
    
public intgetMinimumWidth()

        return mDrawable.getMinimumWidth();
    
public intgetOpacity()

        return mDrawable.getOpacity();
    
public booleangetPadding(android.graphics.Rect padding)

        return mDrawable.getPadding(padding);
    
public int[]getState()

        return mDrawable.getState();
    
public android.graphics.RegiongetTransparentRegion()

        return mDrawable.getTransparentRegion();
    
public android.graphics.drawable.DrawablegetWrappedDrawable()

        return mDrawable;
    
public voidinvalidateDrawable(android.graphics.drawable.Drawable who)
{@inheritDoc}

        invalidateSelf();
    
public booleanisAutoMirrored()

        return DrawableCompat.isAutoMirrored(mDrawable);
    
public booleanisStateful()

        return mDrawable.isStateful();
    
public voidjumpToCurrentState()

        DrawableCompat.jumpToCurrentState(mDrawable);
    
protected booleanonLevelChange(int level)

        return mDrawable.setLevel(level);
    
public voidscheduleDrawable(android.graphics.drawable.Drawable who, java.lang.Runnable what, long when)
{@inheritDoc}

        scheduleSelf(what, when);
    
public voidsetAlpha(int alpha)

        mDrawable.setAlpha(alpha);
    
public voidsetAutoMirrored(boolean mirrored)

        DrawableCompat.setAutoMirrored(mDrawable, mirrored);
    
public voidsetBounds(int left, int top, int right, int bottom)

        super.setBounds(left, top, right, bottom);
        mDrawable.setBounds(left, top, right, bottom);
    
public voidsetChangingConfigurations(int configs)

        mDrawable.setChangingConfigurations(configs);
    
public voidsetColorFilter(android.graphics.ColorFilter cf)

        mDrawable.setColorFilter(cf);
    
public voidsetDither(boolean dither)

        mDrawable.setDither(dither);
    
public voidsetFilterBitmap(boolean filter)

        mDrawable.setFilterBitmap(filter);
    
public voidsetHotspot(float x, float y)

        DrawableCompat.setHotspot(mDrawable, x, y);
    
public voidsetHotspotBounds(int left, int top, int right, int bottom)

        DrawableCompat.setHotspotBounds(mDrawable, left, top, right, bottom);
    
public booleansetState(int[] stateSet)

        return mDrawable.setState(stateSet);
    
public voidsetTint(int tint)

        DrawableCompat.setTint(mDrawable, tint);
    
public voidsetTintList(android.content.res.ColorStateList tint)

        DrawableCompat.setTintList(mDrawable, tint);
    
public voidsetTintMode(PorterDuff.Mode tintMode)

        DrawableCompat.setTintMode(mDrawable, tintMode);
    
public booleansetVisible(boolean visible, boolean restart)

        return super.setVisible(visible, restart) || mDrawable.setVisible(visible, restart);
    
public voidsetWrappedDrawable(android.graphics.drawable.Drawable drawable)

        if (mDrawable != null) {
            mDrawable.setCallback(null);
        }

        mDrawable = drawable;

        if (drawable != null) {
            drawable.setCallback(this);
        }
    
public voidunscheduleDrawable(android.graphics.drawable.Drawable who, java.lang.Runnable what)
{@inheritDoc}

        unscheduleSelf(what);