I am stuck at this for quiet a long time.I have to show the data from REALM in grouped manner.Let me give an example
- Nov 2017
- Item 1
- Item 2
- Item 3
- OCT 2017
- Item 1
- Item 2
- SEP 2017
- Item 1
- Item 2
This list should update itself whenever the data changes.Suppose an item can be inserted in OCT 2017 and then list should reflect the correct data. It will be something like:
- Nov 2017
- Item 1
- Item 2
- Item 3
- OCT 2017
- Item 1
- Item 2
- Item 3
- SEP 2017
- Item 1
- Item 2
I already have a solution but It is not optimal in a sense that I have grouped the data and showing it in RecyclerView
but for any changes I have to call notifyDataSetChanged
to achieve it so that entire UI for the list is redrawn again and it matches my requirement