CardStackView icon indicating copy to clipboard operation
CardStackView copied to clipboard

Notify when stack is empty

Open avinashbanswada opened this issue 5 years ago • 1 comments

Hello, how would I know when I swiped all the cards and the cardstack is empty, so that I would like to enable a button to reload all cards.TIA

avinashbanswada avatar May 19 '20 12:05 avinashbanswada

You can take a variable count and when you will swipe card then onCardSwiped() event will call for ex:

private var count = 0

override fun onCardSwiped(direction: Direction?) { AppLogger.infoLog(TAG, "onCardSwiped") count += 1 if (count == list.size) { // do your work
} }

bonjourrohit89 avatar Jun 11 '20 17:06 bonjourrohit89