I need to group my recycler-view data based on a date and show some dividers in between each group as shown below.
--Item #1--
--Item #2--
-- January 2016(Divider)--
--item #3--
--item #4--
--item #5--
-- December 2015(Divider)--
--item #6--
--item #7--
.... ....
how I can accomplish this?
Sounds like you just want to have two ViewTypes like explained here
You might also want to take a look at this library and if you want it to be expandable and sexy you could take a look at Advanced RecyclerView library.
You need to first sort them based on the date.
then use either view_type (Is there an addHeaderView equivalent for RecyclerView?) as @G.K mentioned or use any recycler header library to set them as sticky headers.
try this : https://github.com/ShamylZakariya/StickyHeaders
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With