ebarrenechea / header-decor

A couple of sticky header decorations for android's recycler view.
Apache License 2.0
878 stars 159 forks source link

Header-decor with Expandable RecyclerView #31

Closed sm-tester closed 6 years ago

sm-tester commented 8 years ago

Hi Eduardo! I tried use Header-decor view with Expandable RecyclerView library (by Ryan Brooks https://github.com/rbro112/expandable-recycler-view ) to create Expandable items with sticky headers but, I have a problem, can you write any commentary to me. When I StickerheaderDecoration send request to adapter by method getHeaderId I can retrun right header position but when expandable items expended then header will be draw header on incorrect position. Can you any suggestion to solve this?

ebarrenechea commented 8 years ago

I haven't really used the header library with expandable items. The cause might be the change of item numbers in the list after an item is expanded since it seems like the library you're using adds extra items to the adapter, so calling clearHeaderCache on the decoration might force the headers to be drawn in the correct place. If you could create a sample project that shows this behaviour I could look more into it on my free time. Thanks!

davideas commented 8 years ago

@boyfox if you search both functionalities, you might want to check my implementation on my page. Feel free to ask there.

sm-tester commented 8 years ago

Thanks @davideas, I seen your project "FlexibleAdapter", I will be try it today.