lisawray / groupie

Groupie helps you display and manage complex RecyclerView layouts.
MIT License
3.66k stars 291 forks source link

Groupie resets child recycler state when parent recyclerview scroll #264

Closed mahmoudashrafmohamed closed 5 years ago

mahmoudashrafmohamed commented 5 years ago

when i use nested recyclerview and scroll , the child recycler ( horizontal recyclerview inside vertical recyclerview ) reset to first element

ValCanBuild commented 5 years ago

Hi @mahmoudashrafmohamed . Can you please provide a bit more detail and examples. Steps to reproduce would also help.

mahmoudashrafmohamed commented 5 years ago

hi @ValCanBuild . For example if i use CarouselItem ( recycler with a horizontal layout manager in a vertically scrolling RecyclerView ) as an items in groupAdapter , vertically scrolling of recycler not restore the state of CarouselItem ( horizontal recycler will scrolled to position 0 ) .

khatv911 commented 5 years ago

you have to make sure to implement diffing in the CarouselItem, otherwise, set items inside the carousel will be the same as notifydatasetchanged.
@ValCanBuild it's not a bug.

ValCanBuild commented 5 years ago

Thanks for the info, @khatv911 . Happy to close it

ghost commented 3 years ago

@khatv911 Sorry but can you give more details on how to handle this kind of scenario? Looks it's likely an issue, maybe not a bug.

Found a PR for more details: https://github.com/lisawray/groupie/pull/309