-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
How to get the swiped card direction, whether it's swiped left or right ?
There's no method to get the swipe direction. Only method available is this
binding.stackLayout.onChangeListener = object : OnChangeListener {
override fun onChange(remainingCardsCount: Int, totalCardsCount: Int) {
//Log.d("StackView", "remainingCardsCount :: $remainingCardsCount, totalCardsCount :: $totalCardsCount")
if (remainingCardsCount < totalCardsCount) {
// Get the item that was just swiped
val swipedItem = allPhotos[currentItemIndex]
// Print the swiped item
Toast.makeText(this@PhotoSwipeActivity, "The currently swiped item is: ${swipedItem.name}", Toast.LENGTH_SHORT).show()
// Increment the counter to track the next item
currentItemIndex++
}
}
}
No way to figure out the swiped direction.
Metadata
Metadata
Assignees
Labels
No labels