private int contentMoveDown(int dy,RecyclerView.Recycler recycler){
  int actualDy=dy;
  int maxHeightItemIndex=getMaxHeightLayoutPositionInLine(0);
  View maxHeightItem=getChildAt(maxHeightItemIndex);
  int offScreenTop=topVisibleEdge() - getDecoratedTop(maxHeightItem);
  if (offScreenTop > Math.abs(actualDy)) {
    offsetChildrenVertical(-dy);
    return dy;
  }
  while (getChildAdapterPosition(0) > 0) {
    addNewLineAtTop(recycler);
    maxHeightItemIndex=getMaxHeightLayoutPositionInLine(0);
    maxHeightItem=getChildAt(maxHeightItemIndex);
    offScreenTop+=getDecoratedMeasuredHeight(maxHeightItem);
    if (offScreenTop >= Math.abs(dy)) {
      break;
    }
  }
  if (offScreenTop < Math.abs(dy)) {
    actualDy=-offScreenTop;
  }
  offsetChildrenVertical(-actualDy);
  while (!lineVisible(getChildCount() - 1)) {
    recycleLine(getChildCount() - 1,recycler);
  }
  firstChildAdapterPosition=getChildAdapterPosition(0);
  return actualDy;
}

private int contentMoveDown ( int dy , RecyclerView . Recycler recycler ) { int actualDy = dy ; int maxHeightItemIndex = getMaxHeightLayoutPositionInLine ( 0 ) ; View maxHeightItem = getChildAt ( maxHeightItemIndex ) ; int offScreenTop = topVisibleEdge ( ) - getDecoratedTop ( maxHeightItem ) ; if ( offScreenTop > Math . abs ( actualDy ) ) { offsetChildrenVertical ( - dy ) ; return dy ; } while ( getChildAdapterPosition ( 0 ) > 0 ) { addNewLineAtTop ( recycler ) ; maxHeightItemIndex = getMaxHeightLayoutPositionInLine ( 0 ) ; maxHeightItem = getChildAt ( maxHeightItemIndex ) ; offScreenTop += getDecoratedMeasuredHeight ( maxHeightItem ) ; if ( offScreenTop >= Math . abs ( dy ) ) { break ; } } if ( offScreenTop < Math . abs ( dy ) ) { actualDy = - offScreenTop ; } offsetChildrenVertical ( - actualDy ) ; while ( ! lineVisible ( getChildCount ( ) - 1 ) ) { recycleLine ( getChildCount ( ) - 1 , recycler ) ; } firstChildAdapterPosition = getChildAdapterPosition ( 0 ) ; return actualDy ; }
contents move down to bottom
