public Rect updateFastScrollerBounds(BaseRecyclerView rv,int lastTouchY){
  mInvalidateRect.set(mBgBounds);
  if (isVisible()) {
    int edgePadding=rv.getMaxScrollbarWidth();
    int bgPadding=(mBgOriginalSize - mTextBounds.height()) / 2;
    int bgHeight=mBgOriginalSize;
    int bgWidth=Math.max(mBgOriginalSize,mTextBounds.width() + (2 * bgPadding));
    if (Utilities.isRtl(mRes)) {
      mBgBounds.left=rv.getBackgroundPadding().left + (2 * rv.getMaxScrollbarWidth());
      mBgBounds.right=mBgBounds.left + bgWidth;
    }
 else {
      mBgBounds.right=rv.getWidth() - rv.getBackgroundPadding().right - (2 * rv.getMaxScrollbarWidth());
      mBgBounds.left=mBgBounds.right - bgWidth;
    }
    mBgBounds.top=lastTouchY - (int)(FAST_SCROLL_OVERLAY_Y_OFFSET_FACTOR * bgHeight);
    mBgBounds.top=Math.max(edgePadding,Math.min(mBgBounds.top,rv.getHeight() - edgePadding - bgHeight));
    mBgBounds.bottom=mBgBounds.top + bgHeight;
  }
 else {
    mBgBounds.setEmpty();
  }
  mInvalidateRect.union(mBgBounds);
  return mInvalidateRect;
}

public Rect updateFastScrollerBounds ( BaseRecyclerView rv , int lastTouchY ) { mInvalidateRect . set ( mBgBounds ) ; if ( isVisible ( ) ) { int edgePadding = rv . getMaxScrollbarWidth ( ) ; int bgPadding = ( mBgOriginalSize - mTextBounds . height ( ) ) / 2 ; int bgHeight = mBgOriginalSize ; int bgWidth = Math . max ( mBgOriginalSize , mTextBounds . width ( ) + ( 2 * bgPadding ) ) ; if ( Utilities . isRtl ( mRes ) ) { mBgBounds . left = rv . getBackgroundPadding ( ) . left + ( 2 * rv . getMaxScrollbarWidth ( ) ) ; mBgBounds . right = mBgBounds . left + bgWidth ; } else { mBgBounds . right = rv . getWidth ( ) - rv . getBackgroundPadding ( ) . right - ( 2 * rv . getMaxScrollbarWidth ( ) ) ; mBgBounds . left = mBgBounds . right - bgWidth ; } mBgBounds . top = lastTouchY - ( int ) ( FAST_SCROLL_OVERLAY_Y_OFFSET_FACTOR * bgHeight ) ; mBgBounds . top = Math . max ( edgePadding , Math . min ( mBgBounds . top , rv . getHeight ( ) - edgePadding - bgHeight ) ) ; mBgBounds . bottom = mBgBounds . top + bgHeight ; } else { mBgBounds . setEmpty ( ) ; } mInvalidateRect . union ( mBgBounds ) ; return mInvalidateRect ; }
updates the bounds for the fast scroller .
