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

Kshitij Patil

12/14/2020, 9:27 PM
A Custom View implementing
onTouchEvent
to handle some gestures doesn't allow gestures when used in a Composable using
AndroidView
. It used to work with compose
alpha04
(the last time I checked this Custom View). Currently I'm using
alpha07
and it's not working anymore. I tried putting that View in a xml file and inflating that layout instead which also didn't work. When I write entire screen in xml and use this View, everything works fine.
r

robnik

12/14/2020, 9:37 PM
Is your onTouchEvent getting called? I just wrote a custom AndroidView this morning that uses onTouchEvent, and it works. I'm using alpha08.
4 Views