yuyakaido / CardStackView

📱Tinder like swipeable card view for Android
Apache License 2.0
2.36k stars 448 forks source link

Provide swiped position to onCardSwiped event #292

Open Barryrowe opened 4 years ago

Barryrowe commented 4 years ago

Whenever a card is swiped, this also captures the position of the swiped card and emits it to the event. This allows us to trust the position at the event handler, and not have to inspect the cardLayoutManager directly. This is helpful in the case where our event may trigger another runnable or otherwise may not be able to trust that the layoutManager has not already calculated another topPosition.

daniel-micic commented 3 years ago

Please merge this, I had exactly the problem Barryrowe described as possible issue