private void configureBounds() {
    Drawable underlyingDrawable = getCurrent();
    Rect bounds = getBounds();
    int underlyingWidth = mUnderlyingWidth = underlyingDrawable.getIntrinsicWidth();
    int underlyingHeight = mUnderlyingHeight = underlyingDrawable.getIntrinsicHeight();

    // In case underlying drawable doesn't have intrinsic dimensions, we cannot set its bounds to
    // -1 so we use our bounds and discard specified matrix. In normal case we use drawable's
    // intrinsic dimensions for its bounds and apply specified matrix to it.
    if (underlyingWidth <= 0 || underlyingHeight <= 0) {
      underlyingDrawable.setBounds(bounds);
      mDrawMatrix = null;
    } else {
      underlyingDrawable.setBounds(0, 0, underlyingWidth, underlyingHeight);
      mDrawMatrix = mMatrix;
    }
  }
private void configureBounds ( ) { Drawable underlyingDrawable = getCurrent ( ) ; Rect bounds = getBounds ( ) ; int underlyingWidth = mUnderlyingWidth = underlyingDrawable . getIntrinsicWidth ( ) ; int underlyingHeight = mUnderlyingHeight = underlyingDrawable . getIntrinsicHeight ( ) ; if ( underlyingWidth <= 0 || underlyingHeight <= 0 ) { underlyingDrawable . setBounds ( bounds ) ; mDrawMatrix = null ; } else { underlyingDrawable . setBounds ( 0 , 0 , underlyingWidth , underlyingHeight ) ; mDrawMatrix = mMatrix ; } }
Determines bounds for the underlying drawable and a matrix that should be applied on it.