CardStackView
CardStackView copied to clipboard
Swipe up to move to next card and swipe down to get the swiped card back?
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?
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.
Yes I also require the same functionality but its not implementing.
this is for real required pretty much!
@yuyakaido hey please look at this!
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:
i found an other project https://github.com/guojilong/SwipeCardsView