How do I detect the onFling of a widget in a ScrollView?

I have a lot of ImageView on ScrollView (which scrolls vertically). And I want to detect vertically onFling from ImageView. I tried to implement SimpleGestureDetector for ImageView, then I can detect onFling when I click horizontally. But when I click vertically, I cannot detect. How can I determine vertically onFling?

I found some solution to the problem similar to mine:

How to use gestures with scrollview - android?

If I only have one ImageView on my ScrollView, this solution might work, but I have multiple ImageViews on the ScrollView that are dynamically generated. So maybe this solution won't work for me ...

+3


source to share





All Articles