int updateFirstAdapterPosition(){
  if (getChildCount() == 0) {
    firstViewAdapterPosition=0;
    firstViewTop=getPaddingTop();
    return firstViewTop;
  }
  View topmostView=getTopmostChildView();
  if (topmostView != null) {
    firstViewAdapterPosition=getViewAdapterPosition(topmostView);
    firstViewTop=Math.min(topmostView.getTop(),getPaddingTop());
    return firstViewTop;
  }
  return firstViewTop;
}

int updateFirstAdapterPosition ( ) { if ( getChildCount ( ) == 0 ) { firstViewAdapterPosition = 0 ; firstViewTop = getPaddingTop ( ) ; return firstViewTop ; } View topmostView = getTopmostChildView ( ) ; if ( topmostView != null ) { firstViewAdapterPosition = getViewAdapterPosition ( topmostView ) ; firstViewTop = Math . min ( topmostView . getTop ( ) , getPaddingTop ( ) ) ; return firstViewTop ; } return firstViewTop ; }
updates firstviewadapterposition to the adapter position of the highest item in the list - e . g . , the adapter position of the item with lowest y value in the list
