Android - Recycler view set item not swipeable
问题 I am using a RecyclerView and ItemTouchHelper.SimpleCallback => onSwiped method. Some of the items at the recycler view are in progress and i want to disable swipe on them. How can i do it? 回答1: You can override getSwipeDirs() in your ItemTouchHelper.SimpleCallback . Return 0 when you don't want an item to be swipe-able. The second parameter to this method is the ViewHolder for the item being swiped- you can add a simple flag to your ViewHolder to indicate whether or not it is swipe-able. For