Hi, I’m trying to add swipe to dismiss to a `Lazy...
# compose
j
Hi, I’m trying to add swipe to dismiss to a
LazyList
. The default implementation of
SwipeToDismiss
will lead to accidental horizontal scrolling while trying to scroll vertically leading to accidental swipe to dismiss events. In vanilla android view world I’d set a touch listener and check against x > y touch event distance before starting swipe to dismiss. However in Jetpack Compose I don’t know how. I tried
pointerInput
modifier, however it disabled vertical scrolling completely. I’m aware of
dismissThresholds
but that does only handle invoking the
dissmissState
change.
j
We've had a similar issue reported recently. cc @levima for tomorrow
c
idk if this is helpful but... https://github.com/saket/swipe
💯 1
j
thanks a lot you guys! ❤️ will try that out
119 Views