Code example for Drawable

Methods: setCallback

0
public class DrawableWrapper extends Drawable implements Drawable.Callback {
    private final Drawable mDrawable;
 
    public DrawableWrapper(Drawable drawable) {
        mDrawable = Preconditions.checkNotNull(drawable);
        mDrawable.setCallback(this);
    } 
 
    @Override 
    public void draw(Canvas canvas) {
        mDrawable.draw(canvas);
    } 
 
    @Override 
    public void setBounds(int left, int top, int right, int bottom) {
        super.setBounds(left, top, right, bottom);
        mDrawable.setBounds(left, top, right, bottom);
    } 
 
    @Override 
    public void setChangingConfigurations(int configs) {