iPaulPro / Android-ItemTouchHelper-Demo

Basic example of using ItemTouchHelper to add drag & drop and swipe-to-dismiss to RecyclerView.
Apache License 2.0
2.51k stars 499 forks source link

OnItemClear #29

Open CodePlayer7 opened 8 years ago

CodePlayer7 commented 8 years ago

in onItemClear of the ViewHolder, better to add if (getAdapterPosition() > -1) itemview. setBackgroundColor(color); Just in case someone like me want to use different color according to adapter position.