Android: Handling tap event on an ImageView inside of a HorizontalScrollView
I have a bunch of ListViews inside of a HorizontalScrollView. I would like to have a "tap" event when the user taps on the image. Currently I am using the OnTouch event but this is a problem. If I swipe the HorizontalScrollView to view more images, the OnTouch event gets fired as soon as I swipe. I really only want it to get fired when I tap on an i开发者_C百科mage but not when I am swiping the actual list of images. Any idea how to do that? Thank you!
You should use onClick instead of onTouch I think.
精彩评论