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

krzysztof

02/23/2021, 8:13 AM
Is there a way to capture (any) touch event at parent level, so that child composables are not reacting to it?
For example, a Column would catch all events, before they reach to any Switch or Checkbox inside of it
s

steelahhh

02/23/2021, 8:47 AM
Copy code
Modifier.pointerInput(Unit) { detectTapGestures(onTap = { }) }
This works for nested composables, not sure about parent/children tho
k

krzysztof

02/23/2021, 8:49 AM
I got it working with
Copy code
.pointerInteropFilter(onTouchEvent = { true })
Which works same as events system from android View
3
3 Views