grandstaish
01/27/2021, 6:55 PMdetectTapGestures
might not detect taps when there’s an ongoing animation on the screen? I have a separate pointerInput
modifier that just logs input events, and both the down&up events are being logged. Once the animation completes, taps are detected fine again. I also added a log to check that my composable wasn’t being re-composed on every frame of the animation, but it doesn’t seem to be 🤔Doris Liu
01/27/2021, 8:14 PMCoroutineScope
that detectTapGestures
is in. Could you share a code snippet?grandstaish
01/27/2021, 8:22 PMModalBottomSheet
from Material, except that it lives inside a fullscreen Android Dialog window.)Doris Liu
01/27/2021, 8:34 PMSwipeableState
doesn't use suspend animation at the moment. Which alpha release/snapshot is this built against?grandstaish
01/27/2021, 8:35 PMSwipeableState
into my app from main (we don’t have a dep on Material)grandstaish
01/27/2021, 8:38 PMDoris Liu
01/27/2021, 8:47 PMswipeable
consumes the tap gesture as a drag during animation: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]ommonMain/kotlin/androidx/compose/material/Swipeable.kt;l=557grandstaish
01/27/2021, 8:50 PMgrandstaish
01/27/2021, 8:50 PMgrandstaish
01/27/2021, 8:51 PMDoris Liu
01/27/2021, 9:07 PMstartDraggingImmediately
flag in swipeable
is to ensure any swiping during the animation gets handled immediately, rather than waiting for a touch slop. I'm not sure what the recommendation would be if you don't want that behavior. @matvei might be able to advise. You might be able to get the tap intercepted if you put the .pointerInput
modifier before the swipeable
, but you'll need to account for the swipe offset yourself.grandstaish
01/27/2021, 9:10 PMfalse
does work around the problem i am facing. IDK how you figured that out by looking at my code dump mind blown