public class HeaderPositionCalculator
extends java.lang.Object
| Constructor and Description |
|---|
HeaderPositionCalculator(StickyRecyclerHeadersAdapter adapter,
HeaderProvider headerProvider,
OrientationProvider orientationProvider,
DimensionCalculator dimensionCalculator) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNewHeader(int position,
boolean isReverseLayout)
Determines if an item in the list should have a header that is different than the item in the
list that immediately precedes it.
|
boolean |
hasStickyHeader(android.view.View itemView,
int orientation,
int position)
Determines if a view should have a sticky header.
|
void |
initHeaderBounds(android.graphics.Rect bounds,
android.support.v7.widget.RecyclerView recyclerView,
android.view.View header,
android.view.View firstView,
boolean firstHeader) |
public HeaderPositionCalculator(StickyRecyclerHeadersAdapter adapter, HeaderProvider headerProvider, OrientationProvider orientationProvider, DimensionCalculator dimensionCalculator)
public boolean hasStickyHeader(android.view.View itemView,
int orientation,
int position)
itemView - given by the RecyclerVieworientation - of the Recyclerviewposition - of the list item in questionpublic boolean hasNewHeader(int position,
boolean isReverseLayout)
position - of the list item in questionsisReverseLayout - TRUE if layout manager has flag isReverseLayoutpublic void initHeaderBounds(android.graphics.Rect bounds,
android.support.v7.widget.RecyclerView recyclerView,
android.view.View header,
android.view.View firstView,
boolean firstHeader)