Closed gregghz closed 6 years ago
StickyHeaderDecoration.getHeader has the section:
if (mHeaderCache.containsKey(key)) { return mHeaderCache.get(key); } else {
Thus once a header has been added to the cache there it will never be regenerated. Calling any of the notify* methods on the adapter have no effect.
You can call clearHeaderCache:
decorator.clearHeaderCache()
https://github.com/edubarr/header-decor/blob/master/lib/src/main/java/ca/barrenechea/widget/recyclerview/decoration/StickyHeaderDecoration.java#L89
thanks, that will be helpful. A way to invalidate a header specifically (like notifyItemChange(i)) would be a nice optimization.
notifyItemChange(i)
StickyHeaderDecoration.getHeader has the section:
Thus once a header has been added to the cache there it will never be regenerated. Calling any of the notify* methods on the adapter have no effect.