luizgrp / SectionedRecyclerViewAdapter

An Adapter that allows a RecyclerView to be split into Sections with headers and/or footers. Each Section can have its state controlled individually.
MIT License
1.68k stars 372 forks source link

How to notifyDataSetChanged #32

Closed arvalon closed 7 years ago

arvalon commented 7 years ago

After add new partitions and/or add an item to a section I call notifyDataSetChanged but the list is not refreshed. The data definitely change because after rotating the screen displays the updated list.

purchaselistRecyclerView.getAdapter().notifyDataSetChanged();

MarStarck commented 7 years ago

I have the same problem while I want to update my data in Sections i have added.

luizgrp commented 7 years ago

Hi, please have a look on the code of examples 3, 4, 6 and 7, they are all successfully refreshing the list with notifyDataSetChanged.

If the examples don't help: @Arvalon I'm happy to help you in your thread in Stack Overflow, please paste your code there. @MarStarck please open a question in Stack Overflow with your code and I'm also happy to help.

shgkshmz commented 7 years ago

What I understand from the examples you pointed out above is that one can easily call the notifyDataSetChanged() method in the Fragment where the adapter was initialized, but is there any way to call notifyDataSetChanged() from within the Sections?

luizgrp commented 7 years ago

@shgkshimizu example 4 is calling notifyDataSetChanged from within the Section