RecyclerView.ItemDecoration doesn't update after item is removed from RecyclerView.Adapter

后端 未结 3 540
小鲜肉
小鲜肉 2020-12-10 03:28

My question

How can I get my ItemDecoration to \"update\" the item offsets for other views when I remove a given view from my adapter and the

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-10 04:00

    This is a too late answer, but I will answer because I have the same problem. Try call RecyclerView.invalidateItemDecorations() before insert/update/remove data.

提交回复
热议问题