ebarrenechea / header-decor

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

Issue when deleting 1st item under header #50

Open REWKyleB opened 7 years ago

REWKyleB commented 7 years ago

When deleting the first item (Item 1 in the screenshot below) the item will jump above "Header 0" before being deleted. I am calling notifyItemRemoved() upon deleting an item.

device-2016-09-28-131314

ebarrenechea commented 7 years ago

Hi @REWKyleB, do you have an animation associated with deleting the item? Are you clearing the header cache on the decoration as well? It be a lot of help if you could provide a sample that shows this issue.

REWKyleB commented 7 years ago

Hi @edubarr, Thank you for the reply. I don't have a code snippet handy, but I can give a few details on the implementation I previously had. I was using the RecyclerView DefaultItemAnimator and I was clearing the header cache on the decoration.

TostF commented 7 years ago

I have the same problem. It only appears when using notifyItemRemoved(i) method in my recycler adapter. This glitch happends only on the item that is "holding" sticky header.

Nammy1101 commented 7 years ago

Same issue, when using notifyItemRemoved for item directly underneath sticky header, causes header to momentarily move to bottom of item to be deleted before animation, then performs remove animation.