SectionedRecyclerView
SectionedRecyclerView copied to clipboard
Expose section and position within a section for a given absolute position
A use case for exposing these properties is determining the column span of a particular position of a RecyclerView
using a GridLayoutManager
. Using your own custom GridLayoutManager.SpanSizeLookup
to implement your own getSpanSize(int)
only provides you with an absolute position, and if you want to determine different span sizes for your non-header/footer items, it helps to know which section a particular absolute position is in, or what position in a section a given absolute position is.