Meetic / Shuffle

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

Discarding views #5

Closed n1schal closed 8 years ago

n1schal commented 8 years ago

Hey

Nice library.

Was wondering if you could add an attribute that would make the swiped cards get discarded instead of getting sent to the end of the stack?

Also, does it have an onClick listener for the views?

mgursch commented 8 years ago

How can i send it to the end of the stack? In my app discarted views are really discarted - would love to send it to the end of the stack

I implemented OnClickListener within adapters onBind... method.

n1schal commented 8 years ago

My bad ! I had many items and jumped to the conclusion that they weren't being discarded. They are actually being discarded, but the effect makes it seems like they're being sent to the end.

Sorry O:)

florent37 commented 8 years ago

Hi, with the default implémentation of ViewAnimatorShuffle, if card is pushed to right she came back behind the stack, but you can copy the ViewAnimatorShuffle and modify it to always discard it :) I think we'll add on this object to easily adjust this animation in the next release

florent37 commented 8 years ago

look at 1.0.3 👍

shuffle.setViewAnimator(new ShuffleViewAnimator()
            .setPushLeftAnimateViewStackScaleUp(false)
            .setPushRightAnimateViewStackScaleUp(true)
            .setPushTopAnimateViewStackScaleUp(false)
            .setPushBottomAnimateViewStackScaleUp(false)
        );