setTouchDelegateView

fun ViewGroup.setTouchDelegateView(delegateChildView: View?)

Sets a TouchDelegate to forward all the touch events received by this ViewGroup to delegateChildView. The delegateChildView view should be a child of this ViewGroup. If delegateChildView is null, the set TouchDelegate is cleared.

Throws

when the delegateChildView view is not a child of this ViewGroup.