bgogetap / StickyHeaders

Easily add Sticky Headers to your RecyclerView
Apache License 2.0
521 stars 88 forks source link

Header not positioned after configuration changed #1

Closed bgogetap closed 8 years ago

bgogetap commented 8 years ago

The header is not being added correctly after a configuration change (or any change that causes a layout pass for the StickyLayoutManager).

This can be fixed by disabling the logic in the StickyHeaderPositioner#reset method, but getting rid of that logic creates other issues, like the header still being sticky after that specific item has been removed from the dataset. It also can lead to an NPE in the layoutChildren method of the RecyclerView parent that is hosting the header (Header is removed after parent ViewGroup has counted it as a child). The StickyHeaderPositioner#safeDetachHeader method fixes that issue, but something else is causing the header to not show.