-
-
Notifications
You must be signed in to change notification settings - Fork 492
Open
Description
It is not an issue, but i wonder that lib can do it.
Can I Swipe item view then remain it's state then delete button can click or continue swipe to delete that item.
my image like that lib:
https://github.com/daimajia/AndroidSwipeLayout
// add swipe as well
val leaveBehindDrawableLeft = context.getDrawable(R.drawable.ic_delete)
val callback = object : SimpleSwipeCallback.ItemSwipeCallback {
override fun itemSwiped(position: Int, direction: Int) {
logi("itemSwiped $position, $direction")
}
}
val touchCallback = SimpleSwipeCallback(
callback,
leaveBehindDrawableLeft
)
val touchHelper = ItemTouchHelper(touchCallback) // Create ItemTouchHelper
touchHelper.attachToRecyclerView(findviewbyId(R.id.recyclerView)) // Attach ItemTouchHelper to RecyclerView`
Details
- Used library version: 4.1.1
Checklist
- Searched for similar issues
- Checked out the sample application
- Read the README
- Checked out the CHANGELOG
- Checked out the MIGRATION GUIDE
Metadata
Metadata
Assignees
Labels
No labels