the open drawer gesture doesn’t work, with the pager seeming taking priority. This is good. However, when the scaffold content contains my custom composable where the user can draw strokes (I use
Modifier.pointerInteropFilter
for this), then the drawer gestures take priority and so no strokes can be drawn. My current workaround is to explicitly disable drawer gestures when that composable is visible. But is there a better way perhaps involving priority with which pointer events are consumed?
a
Albert Chang
03/08/2024, 1:25 PM
There is a
requestDisallowInterceptTouchEvent
parameter. You should invoke the lambda if you don’t want pointer input to be stolen by parent, same as in the view world.
m
Mark
03/08/2024, 2:32 PM
Thank Albert. So I see I can pass an instance of
RequestDisallowInterceptTouchEvent()
to
pointerInteropFilter
and the documentation says “you can later call it” but when should it be called?
a
Albert Chang
03/08/2024, 3:01 PM
When you detected that a gesture has started and you want to handle the following events of the gesture.