fondesa / recycler-view-divider

A library which configures a divider for a RecyclerView.
Apache License 2.0
506 stars 44 forks source link

The size of the divider is wrong after notifyItemRemoved() #204

Open Back4fire opened 3 years ago

Back4fire commented 3 years ago

The size of the horizontal divider will get bigger and bigger when removing items in a RecyclerView with a GridLayoutManager repeatedly.

RecyclerViewDivider version: 3.5.0

A Test Project: MyApplication.zip

fondesa commented 3 years ago

Thanks for the sample. I'll investigate this.

fondesa commented 2 years ago

I've not found a solution yet for this issue.

The issue is related to the item animator attached by default to a RecyclerView:

recyclerView.itemAnimator = null

The workaround to this is removing the item animator but I'm searching a way to fix the remove animation in a GridLayoutManager.