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

Disable swipe by row type #80

Closed
mdtuyen opened this issue May 12, 2016 · 3 comments
Closed

Disable swipe by row type #80

mdtuyen opened this issue May 12, 2016 · 3 comments
Milestone

Comments

@mdtuyen
Copy link

mdtuyen commented May 12, 2016

I enabled swipe to delete item, but with some row on a head or expanable header I don't want wipe for it. Please help me a solution.

@davideas davideas changed the title Disable swipe some row: Disable swipe by row type May 13, 2016
@davideas
Copy link
Owner

Hello, I have already checked that this is possible, and it was already planned to implement. I will try to add this new feature on next util build.
Thanks for the comment.

@davideas davideas added this to the 5.0.0 milestone May 13, 2016
davideas added a commit that referenced this issue May 14, 2016
@davideas
Copy link
Owner

davideas commented May 14, 2016

There are 2 ways to customize if a specific item type is Draggable or Swipeable #26:

  • Using the item interface: call setDraggable() and setSwipeable(), in the constructor or in the binding depends by your use case.
  • Alternatively, override the 2 methods isDraggable(), isSwipeable() inside the implementation of the FlexibleViewHolder to return always true.

By default items are NOT Draggable nor Swipeable.

This feature will be published in the next SNAPSHOT and next release.

@mdtuyen
Copy link
Author

mdtuyen commented May 14, 2016

Thanks for your help,

I need a power recyclerview for my project. FlexibleAdapter is a best for me.
Thanks a gain.

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

No branches or pull requests

2 participants