Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
5 tasks done
sontnfabbi opened this issue May 13, 2024 · 2 comments
Open
5 tasks done

Comments

@sontnfabbi
Copy link

sontnfabbi commented May 13, 2024

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

@mikepenz
Copy link
Owner

The library offers some utils related to swipe of items. best checkout the sample app to see if you can find what you be looking for.

@sontnfabbi
Copy link
Author

The library offers some utils related to swipe of items. best checkout the sample app to see if you can find what you be looking for.

@mikepenz I tried all sample but its not work that why I must to ask this post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants