CardStackView icon indicating copy to clipboard operation
CardStackView copied to clipboard

Swipe up to move to next card and swipe down to get the swiped card back?

Open codefury opened this issue 4 years ago • 6 comments

Hello,

I have this setting

manager.setStackFrom(StackFrom.Bottom)
        manager.setVisibleCount(3)
        manager.setTranslationInterval(8.0f)
        manager.setScaleInterval(0.98f)
        manager.setSwipeThreshold(0.3f)
        manager.setMaxDegree(0.0f)
        manager.setDirections(Direction.VERTICAL)
        manager.setCanScrollHorizontal(false)
        manager.setCanScrollVertical(true)
        manager.setSwipeableMethod(SwipeableMethod.Manual)
        manager.setOverlayInterpolator(LinearInterpolator())
        cardStackView.layoutManager = manager
        cardStackView.adapter = adapter
        cardStackView.itemAnimator.apply {
            if (this is DefaultItemAnimator) {
                supportsChangeAnimations = false
            }
        }

How can i get the functionality where I can swipe up to remove current card and then swipe down to get that card back?

codefury avatar Nov 12 '19 10:11 codefury

Please confirm if you get the solution here? I am also trying to implement same feature here. I found that something to be done in this calculateDistanceToFinalSnap(). But not sure.

Harneetk avatar Nov 19 '19 12:11 Harneetk

Yes I also require the same functionality but its not implementing.

RahulKandoriya avatar Dec 04 '19 13:12 RahulKandoriya

this is for real required pretty much!

angad305 avatar Apr 17 '20 07:04 angad305

@yuyakaido hey please look at this!

codefury avatar Jul 21 '20 07:07 codefury

i have a solution,put the cardviewstack into a viewgroup and override some methods of the viewgroup to decide which events should dispatch to cardviewstack. for example: image image

guojilong avatar Sep 13 '22 06:09 guojilong

i found an other project https://github.com/guojilong/SwipeCardsView

guojilong avatar Sep 21 '22 09:09 guojilong