Closed DarkVio closed 8 years ago
Hi @DarkVio, Trying to better understand your request. Are you saying you would like to have a method that will trigger a onItemsChanged for the entire list? Basically saying the data has changed everywhere, but the position or size has not?
I change the data in Child Item and send notifyChildItemChanged in the Adapter, but I do not resize, I change the data inside. If I send notifyDataSetChanged accepts the changes ParentItem, ChildItem does not change. I looked and it seems to me that notifyChildItemChanged changes the size but not the data inside. Maybe I'm wrong.
Still a little unclear here, maybe some more information will help:
Behind the scenes notifyChildItemChanged
will call notifyItemChanged
for JUST that single child items position. It will not affect the ParentItem. So it serves as a refresh for that single view, not changes in position or size are allowed for this notify.
notifyDataSetChanged
is not currently supported right now, not sure what the behaviour of calling this would be.
notifyParentItemChanged
will notify both the ParentItem and the children if is expanded with a notifyItemRangeChanged
that includes the ParentItem and the children. Again just a refresh of data, no change in position.
Let me know if that helps, if not I'll need a little more information as to what your goals are here. What has changed and what do you need to be updated in your views/adapter.
how to update child item after replace item? when i used notifyParentItemChanged only ParentItem refreshed but childItem cant be refreshed. which method is used to refresh child item.
@kyogs might have a slight bug in notifyParentItemChanged
, we aren't replacing the children with the new children.
For now you can use notifyChildItemChanged
to notify of childItems being changed.
Actually looks like they both might suffer the same bug, will try to get a 2.0.2 release soon
notifyChildItemChanged causes notifyItemChanged. I would like to have a notifyDataSetChanged method which cause a onItemsChanged for the child. snx)