expandable-recycler-view
expandable-recycler-view copied to clipboard
notifyParentDataSetChanged doesn't refresh items
Hello. I have an adapter where mostly child items are changed. I create it like this - mEventAdapter = new SubCategoryExpandableRecyclerAdapter(context, getEventItems(mChannelId)), where getEventItems(mChannelId) returns array. Then I get in array new items and call notifyParentDataSetChanged after, but data in adapter doesn't changed.
Hello, I have the same problem. You have got to solve it?
Not yet. We leaved it as is for some time.
@bene25 @volkdown
Sorry for the late reply here. Any chance you can reproduce this in the existing samples or create a small light sample that shows the issue?
At a glance, it may be that you are getting a new array reference instead of editing the existing list. So the call to notifyParentDataSetChanged
does nothing since the array is still pointing to old data.
I'm sorry, but everything works. I can not properly use the data update. I did like this mAdapter.setParentList(generateData(mData), false); mAdapter.notifyDataSetChanged(); It works for me.
No problem, glad it's working. Will see if this is the case for bene25 as well.