Android - Mulitple listeners on a single view with the ability to pass off events to other views

146 Views Asked by At

I have a Gallery that contains a ScrollView. I can scroll through the text in the ScrollView with a vertical swipe as is standard. However, I would like the ScrollView to also listen for horizontal swipes which would then move the Gallery left or right. Does anyone know how to do that?

Thanks.

1

There are 1 best solutions below

0
On BEST ANSWER

Okay, here is what I found. You will need to use onInterceptTouchEvent(). You can read about it here: http://developer.android.com/reference/android/view/ViewGroup.html

Alternatively, you can do a search for onInterceptTouchEvent example to find several examples.