In my app i am using ScrollView for scrolling the ImageView, and i will add one customview dynamically to that ScrollView overlay of ImageView, i have onTouch events for customview. after adding to the scroll view i am not able to use the touch listeners of customview, still scrollview was working on that.
how to stop the scrollview touch listeners, and how to enable our custom view touch listeners..
I suggest you not to go with
ScrollView. Simply add your custom view inLinearLayoutand implementOnGestureListenerand then usingGestureDetectoryou can able to listen all events(like onDown(),onFling(),onScroll(),onSingleTapUp(),onDown(),etc). You can sense scroll magnitudes and then by usingscrollBy()method you can scroll your image(custom view). For more detilas you can refer following posts:Smooth scrolling in Android