public void initHeaderBounds(Rect bounds, RecyclerView recyclerView, View header, View firstView, boolean firstHeader) {
    int orientation = mOrientationProvider.getOrientation(recyclerView);
    initDefaultHeaderOffset(bounds, recyclerView, header, firstView, orientation);

    if (firstHeader && isStickyHeaderBeingPushedOffscreen(recyclerView, header)) {
      View viewAfterNextHeader = getFirstViewUnobscuredByHeader(recyclerView, header);
      int firstViewUnderHeaderPosition = recyclerView.getChildAdapterPosition(viewAfterNextHeader);
      View secondHeader = mHeaderProvider.getHeader(recyclerView, firstViewUnderHeaderPosition);
      translateHeaderWithNextHeader(recyclerView, mOrientationProvider.getOrientation(recyclerView), bounds,
          header, viewAfterNextHeader, secondHeader);
    }
  }
Determines if an item in the list should have a header that is different than the item in the
list that immediately precedes it. Items with no headers will always return false.

@param position of the list item in questions
@param isReverseLayout TRUE if layout manager has flag isReverseLayout
@return true if this item has a different header than the previous item in the list
library/src/main/java/com/timehop/stickyheadersrecyclerview/HeaderPositionCalculator.java