ebarrenechea / header-decor

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

Sticky Header and View overlay #30

Closed ghost closed 8 years ago

ghost commented 8 years ago

In Sticky Header both onCreateHeaderViewHolder and onCreateViewHolder is invoked in one item in same time

ebarrenechea commented 8 years ago

I'm not sure I understand your issue, but onCreateHeaderViewHolder is called whenever you first encounter a view that needs a header. Since there's no recycling of view for the headers, each entry in the list with a header has its own header view, which are cached in the decoration. This may occur in the same pass as onCreateViewHolder is called which is the intended behaviour.

Please clarify your issue/question if this answer doesn't help you. Thanks. :)

ghost commented 8 years ago

These codes are different decor = new StickyHeaderDecoration(adapter); //Sticky header decor = new StickyHeaderDecoration(adapter, true); //Inline Sticky header My Problem solved