Code example for Drawable

Methods: getOpacity

0
        public void setColorFilter(ColorFilter cf) {
            mRealDrawable.setColorFilter(cf);
        } 
        @Override 
        public int getOpacity() { 
            return mRealDrawable.getOpacity();
        } 
    } 
 
    public TargetDrawable(Resources res, int resId) {
        this(res, resId == 0 ? null : res.getDrawable(resId));
    } 
 
    public TargetDrawable(Resources res, Drawable drawable) {
        // Mutate the drawable so we can animate shared drawable properties. 
        mDrawable = drawable != null ? drawable.mutate() : null;
        resizeDrawables(); 
        setState(STATE_INACTIVE);
    } 
 
    public void setState(int [] state) {