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

Added ability to disable swipe in either directions #92

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

nithinnara
Copy link

Swipe gestures can be used in cases other than just a simple imageview and sometimes you wish to disable swipe especially the right swipe until some sort of user action is completed.This can disable and enable swipe in both directions at any point by calling the listener method.

@confile
Copy link

confile commented Sep 1, 2015

@nithinnara This is a good idea. Do you see how one can check if isEnable just right before the card swipes out of the screen. In other words. The user moves the card for example to the right and removes his finger from the screen. Normally the card you swipe out to the right.

Now in case `ìsEnable`` is false for the direction right the swipe should be canceled and the card should move back to where the center.

Do you have any idea how to do that?

@confile
Copy link

confile commented Sep 1, 2015

@nithinnara The problem with your request is that when you disallow one direction lets say left enabled and right disabled. Then you can swipe to the left but you cannot swipe back to the center.

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

Successfully merging this pull request may close these issues.

2 participants