SjoerdvGestel SjoerdvGestel - 12 days ago 6
Android Question

Bottomsheet touch events received by mapview

I've implemented a bottom sheet inside of the layout containing a map view.
When the bottomsheet is visible and expanded, when i touch or drag on the bottomsheet, the underling map moves aswell. Is it possible to block the touch events from reaching the mapview?

I've tried using setFilterTouchesWhenObscured without any luck.

ps. I'm not looking to disable the map gestures

Answer

Just make it clickable adding android:clickable="true to it's definition on the XML layout