Code example for Drawable

Methods: getBounds

0
 
    @Override 
    public void invalidateDrawable(Drawable dr) {
        if (!mInDrawing) {
            if (verifyDrawable(dr)) {
                final Rect dirty = dr.getBounds();
                final int scrollX = getScrollX() + getPaddingLeft();
                final int scrollY = getScrollY() + getPaddingTop();
 
                invalidate(dirty.left + scrollX, dirty.top + scrollY,
                        dirty.right + scrollX, dirty.bottom + scrollY);
            } else { 
                super.invalidateDrawable(dr);
            } 
        } 
    } 
 
    /** 
     * @hide 
     * 
    @Override