emilsjolander / StickyListHeaders

An android library for section headers that stick to the top
Apache License 2.0
5.51k stars 1.52k forks source link

error when reusing the headers? #84

Open alirahimpour89 opened 11 years ago

alirahimpour89 commented 11 years ago

Hi! I am trying to update a header without reloading the adapter (reloading the adapter will cancel the list selector animation).

I have saved the header view in a array so I can edit a label inside it later and it works sometimes but not always...

is some states it is updating correctly but in some states it is reusing a old version of the header so it wont update when I try to update it...

is there any easy way to update the headers without reloading the whole list or is my way the correct way to do it?

emilsjolander commented 11 years ago

There is no good way of doing this as of now. I will mark this as an enhancement and might implement a findHeaderById() method in a future update :)

The reason holding a pointer to the headers does not work is because not all headers are recycled, during certain states a header will be removed without being recycled.

alirahimpour89 commented 11 years ago

That would be great! Because updating the headers is pretty important for me :)

bkach commented 8 years ago

+1 Any progress on this? Is there any other way to access the headers? I've got a checkbox on each header, and I'm at a loss to find a way to update them on a dataSetObserver.