I am trying to recreate tinder’s swiping card with...
# compose
a
I am trying to recreate tinder’s swiping card with a custom
Modifier
I created. the swiping animation works great if I use a mouse, either on the emulator or on my device using scrcpy. If I use my finger, then the animation ‘stops’. I tried wrapping the
Animatable.animateTo()
with a try catch and what happens is that the coroutine gets interupted. if i wrap it with a try catch, then the card disappears (i am guessing the animation jumps to the end?). my assumption here is that my finger triggers a dragging animation (see code in thread) and it interrupts the swipe animation. I tried logging it but the logs show that everything happens in the expended order (drag -> swipe), so it doesn’t make sense for a drag to cancel the swipe. Any pointers would be appreciated. Code links in the 🧵
💯 1