private void correctTooWide(int childCount){
  int lastPosition=mFirstPosition + childCount - 1;
  if (lastPosition == mItemCount - 1 && childCount > 0) {
    final View lastChild=getChildAt(childCount - 1);
    final int lastRight=lastChild.getRight();
    final int end=(getRight() - getLeft()) - mListPadding.right;
    int rightOffset=end - lastRight;
    View firstChild=getChildAt(0);
    final int firstLeft=firstChild.getLeft();
    if (rightOffset > 0 && (mFirstPosition > 0 || firstLeft < mListPadding.top)) {
      if (mFirstPosition == 0) {
        rightOffset=Math.min(rightOffset,mListPadding.top - firstLeft);
      }
      offsetChildrenLeftAndRight(rightOffset);
      if (mFirstPosition > 0) {
        fillLeft(mFirstPosition - 1,firstChild.getLeft() - mDividerWidth);
        adjustViewsLeftOrRight();
      }
    }
  }
}

private void correctTooWide ( int childCount ) { int lastPosition = mFirstPosition + childCount - 1 ; if ( lastPosition == mItemCount - 1 && childCount > 0 ) { final View lastChild = getChildAt ( childCount - 1 ) ; final int lastRight = lastChild . getRight ( ) ; final int end = ( getRight ( ) - getLeft ( ) ) - mListPadding . right ; int rightOffset = end - lastRight ; View firstChild = getChildAt ( 0 ) ; final int firstLeft = firstChild . getLeft ( ) ; if ( rightOffset > 0 && ( mFirstPosition > 0 || firstLeft < mListPadding . top ) ) { if ( mFirstPosition == 0 ) { rightOffset = Math . min ( rightOffset , mListPadding . top - firstLeft ) ; } offsetChildrenLeftAndRight ( rightOffset ) ; if ( mFirstPosition > 0 ) { fillLeft ( mFirstPosition - 1 , firstChild . getLeft ( ) - mDividerWidth ) ; adjustViewsLeftOrRight ( ) ; } } } }
check if we have dragged the right of the list too wide ( we have pushed the left element off the left of the screen when we did not need to ) . correct by sliding everything back down .
