code: private void updateDrawableBounds() {
          if (mDrawableRect == null) {
              mDrawableRect = new RectF();
          }
          Drawable d = getDrawable();
          if (d != null && d.getIntrinsicHeight() > 0 && d.getIntrinsicWidth() > 0) {
              mDrawableRect.set(0, 0, d.getIntrinsicWidth(), d.getIntrinsicHeight());
          }
      }
docs: Updates the drawable bounds rect. This must be called every time the drawable
  associated to this view changes.