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

Allow swipe to dismiss to be cancelled from within the adapter #4

Open
PawanHegde opened this issue Aug 7, 2016 · 1 comment
Open

Comments

@PawanHegde
Copy link

I have a view in the recyclerview that I'd like to be undismissable. While I'd prefer that I have an option to disable swipe to dismiss for particular views, I'd be okay with the swiped-away view bouncing back in if onItemDismiss returns false.

Currently onItemDismiss does not return anything. Maybe it could be made to return a boolean like onItemMove to indicate if the view should be dismissed or not.

@haithamsboui
Copy link

Hey, I know this is kinda late but for those who still need it just add notifyItemChanged(position); in onItemDismiss without deleting the element from your collection .

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