onInterceptTouchEvent

open override fun onInterceptTouchEvent(ev: MotionEvent?): Boolean

Implement this method to intercept all touch screen motion events. This allows you to watch events as they are dispatched to your children, and take ownership of the current gesture at any point.

Return

Return true to steal motion events from the children and have them dispatched to this ViewGroup through onTouchEvent(). The current target will receive an ACTION_CANCEL event, and no further messages will be delivered here.

Parameters

ev

The motion event being dispatched down the hierarchy.