I created a custom View that implements a GestureListener
and all the necessary logic to allow for some scrolling within the View. It works fine, as long as I do not put the View into some other scrollable View, e.g., a ScrollView
.
If I wrap my View with a ScrollView
, the touch events seem to be consumed by the ScrollView
completely and are not handed through to my custom View. How can I tell the ScrollView
that it should only consume touch events, if the touching happens outside of one of its children?
You can request your scrollable container to not intercept touch events from your
View
by callingrequestDisallowInterceptTouchEvent(true)
on it when you receive anACTION_DOWN
event on yourView
.