eowise / recyclerview-stickyheaders

DEPRECATED. Android library that integrate sticky section headers in your RecyclerView
http://eowise.github.io/recyclerview-stickyheaders
MIT License
960 stars 148 forks source link

Headers does not get updated when notifyItemMoved is called #26

Closed Hanspagh closed 6 years ago

Hanspagh commented 9 years ago

I am having a list with the following structure. Header1 Item1 Item2 Item3 Header2 Item4 Header3 item5

When I try to move the last three items to bottom of the list using notifyItemMoved I get the following the result

Header2 Item4 Item5 Item1 Header1 Item2 Header1 Item3

Calling notifydatasetChanged fixes this and produces the correct list Header2 Item4 Header3 Item5 Header1 Item1 Item2 Item3 But that makes the animation of the notifyItemMoved look very weird

For me it looks like the placement of the headers does not get updated only the content of the already placed headers does get updated.

leruaa commented 9 years ago

Can you provide a code sample that demonstrate this issue ?

Hanspagh commented 9 years ago

Here is a modified version of your sample to reproduce the problem. https://github.com/Hanspagh/StickyListTest

leruaa commented 9 years ago

Thanks, I will have a look.

amansatija commented 9 years ago

I believe the headers are being stored in the hasmap , if u call headerStore.clear() after calling the notify dataset changed adapter , I think your issue will be resolved , the headers will be updated then

kraizman commented 9 years ago

When version 0.6.0 with fix will be released?