https://kotlinlang.org logo
#compose
Title
# compose
m

manueldidonna

05/08/2020, 2:32 AM
There is a way to detect a swipe gesture?
l

Leland Richardson [G]

05/08/2020, 2:43 AM
i believe so but @Shep Shapard will know more
❤️ 1
g

Gabriel Feo

05/08/2020, 2:54 AM
I think there's a swipeGestureFilter modifier
m

manueldidonna

05/08/2020, 7:25 AM
I've only found a DragGestureFilter modifier that I could use to detect a fling
☝🏻 1
m

matvei

05/12/2020, 1:03 PM
Hey. I have some ideas how we can provide high-level APIs like that. Can you elaborate on the use case you have? What behaviour do you want for swipe? Just nitiufication when swipe happens? Or track the in-progress value to animate / drag smth and then finish with fling animation (swipe-to-dismiss usecase)? Please, provide more details and maybe we can file a FR. Also, take a look at
Modifier.draggable
, it allows you to draw in the direction and then easy fling binding for after-drag animation (See Samples in docs: https://developer.android.com/reference/kotlin/androidx/ui/foundation/gestures/package-summary#draggable) `Also, take a loot at
10 Views