futuredapp / infinity

[Deprecated] Infinite paginated RecyclerView scrolling
MIT License
27 stars 8 forks source link

Sectionned list #19

Closed vpratfr closed 7 years ago

vpratfr commented 7 years ago

Hi,

Great library, congrats. I wonder if you already have experience on how to get sections to work with your adapter?

Something like https://gist.github.com/gabrielemariotti/4c189fb1124df4556058

I have items with a date, and I would like to section them by day. Something like:

They already come sorted by DESC data from my API.

skywall commented 7 years ago

Hello, these two are basically two different types of adapters and its going to be quite hard to implement this in Infinity. I recommend you to transform (flatten) your data to simple list with multiple ViewTypes and bind ViewHolder's as usual.

vpratfr commented 7 years ago

Got it working rather nicely with https://github.com/edubarr/header-decor

There is just a slight naming issue as mentionned on https://github.com/edubarr/header-decor/issues/67#issuecomment-280040232