Disable Swipe
khalil05400 opened this issue · comments
khalil05400 commented
I want to disable swipe on some screen programmatically?unable to do this
SH KIM commented
// MEMO: Item. swiping setting
override fun canBeSwiped(item: Item, viewHolder: ViewHolder, position: Int): Boolean {
return false
}
Julio Ernesto Rodríguez Cabañas commented
As @WORLD8848 has explained, you can disable swiping for each individual item overriding the adapter method canBeSwiped
. Furthermore, if you want to disable swiping for just one direction, please check out the recycler view method called disableSwipeDirection
.
You can find information about this and more in the readme file.