Android multitouch! hack anyone?

The best solution here is to put

android:splitMotionEvents = false 

inside LinearLayout or any Layout your view (Button, TextView, etc) is.

-cheers happy codings


You need to override onInterceptTouchEvent as well to capture motion events. When you return true from onInterceptTouchEvent, all subsequent events (whether inside your view bounds or not) are captured in calls to onTouchEvent up until (and including) the point where the last pointer goes up.

Traditionally, you put enough logic in onInterceptTouchEvent to determine that a pointer has gone down, AND that it has moved beyond some threshold before returning true, but that depends on whether you want to support drag in horizontal and/or vertical directions in parent views. If an ACTION_POINTER_DOWN event is sufficient to trigger the capture, then you can return true immediately.