Skip to content Skip to sidebar Skip to footer

Handle Touch Events In Scrollview Android

I would like to implement drag-n-drop feature for Android 2.2. I override onTouchListener for each my control. But all my controls are inside ScrollView. When all my controls are v

Solution 1:

Use mScrollView.requestDisallowInterceptTouchEvent(true); to avoid ScrollView to handle touchEvents. Also as Ridcully pointed out handle the touch event in onInterceptTouchEvent().

Solution 2:

Have a look at the onInterceptTouchEvent() method. You'll have to sub-class ScrollView and override and tweak this method.

Post a Comment for "Handle Touch Events In Scrollview Android"