onInterceptTouch

inline fun Style.onInterceptTouch(noinline action: (InterceptTouchEvent) -> Boolean): Style

Sets a listener that will 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. Implementations should return true if they intercepted the event and wish to receive subsequent events, and false otherwise. Setting this property will cause the Component to be represented as a View at mount time if it wasn't going to already.

See android.view.ViewGroup.onInterceptTouchEvent


inline fun Style.onInterceptTouch(enabled: Boolean, noinline action: (InterceptTouchEvent) -> Boolean): Style

Sets a listener that will intercept all touch screen motion events but only if enabled is true. This allows you to watch events as they are dispatched to your children, and take ownership of the current gesture at any point. Implementations should return true if they intercepted the event and wish to receive subsequent events, and false otherwise. If enabled is true, setting this property will cause the Component to be represented as a View at mount time if it wasn't going to already.

See android.view.ViewGroup.onInterceptTouchEvent