Showing custom View under swiped RecyclerView item

后端 未结 5 1074
独厮守ぢ
独厮守ぢ 2020-12-24 08:55

First of all, I saw this question: Adding a colored background with text/icon under swiped row when using Android's RecyclerView

However, even though the title s

5条回答
  •  伪装坚强ぢ
    2020-12-24 09:42

    Instead of draw over, I believe you should use viewType

    Implements getItemViewType(int position) in adapter, returning different types, e.g. 0 for normal, 1 for swipped

    and change onCreateViewHolder etc to return different layout on different viewType

提交回复
热议问题