Meetic / Shuffle

An easy to use swiping-view for Android
886 stars 83 forks source link

disable swipe #17

Open pixelbendr opened 8 years ago

pixelbendr commented 8 years ago

Is it possible to disable swipe for left or right? in my app I want users to just swipe right to depict moving through a list.

pixelbendr commented 8 years ago

Any info on this?

pacoalface commented 7 years ago

Hi @pixelbendr ! we have the same problem, we only allow users to swipe right. You can try to add something like this on your Shuffle view setup:

swipeCardsComponent.setViewAnimator(new ShuffleViewAnimator() { @Override public boolean animateExit(@NonNull CardDraggableView draggableView, Direction direction, int duration) { return super.animateExit(draggableView, Direction.RIGHT, duration); } }.setPushRightAnimateViewStackScaleUp(true).setPushLeftAnimateViewStackScaleUp(true));

RowlandOti commented 6 years ago

@pixelbendr ,use app:shuffle_infinite="true" users can now just swipe through the list, while not dismissing the items.