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

I am unable to set the card to its original position( Now it's Discarded Automatically) Once I move card. #86

Open
ChetnaNakum opened this issue Jun 13, 2017 · 5 comments

Comments

@ChetnaNakum
Copy link

No description provided.

@maks-novikov
Copy link

hi, do you mean that when you move a little you cant set it back and it will always swipe?

@maks-novikov
Copy link

if this is the problem you need to add logic to swipeEnd() callback.

@OverRide
public boolean swipeEnd(int section, float distance) {
//Toast.makeText(this,"swipe end",Toast.LENGTH_SHORT).show();
Log.i("LogTag","SwipeEnd: "+distance);
if(distance > 450)
return true;
else
return false;
}

//450 is the minimum distance that user have to move the card for swipr, you can play with that parameter as you want.

@ChetnaNakum
Copy link
Author

ChetnaNakum commented Aug 2, 2017 via email

@ChetnaNakum
Copy link
Author

ChetnaNakum commented Aug 2, 2017 via email

@maks-novikov
Copy link

another way to control minimum travel for discard is :
private CardStack cardStackView = new CardStack();
int minimumTravelToDiscard = 400;
cardStackView.setThreshold(minimumTravelToDiscard );

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