Skip to content

Can I Swipe item view then remain it's state then delete button can click  #1054

@sontnfabbi

Description

@sontnfabbi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions