onTouch

inline fun Style.onTouch(noinline action: (TouchEvent) -> Boolean): Style

Sets a listener that will invoke the given lambda when this Component is touched. Setting this property will cause the Component to be represented as a View at mount time if it wasn't going to already.


inline fun Style.onTouch(enabled: Boolean, noinline action: (TouchEvent) -> Boolean): Style

Sets a listener that will invoke the given lambda when this Component is touched but only if enabled is true. If enabled, setting this property will cause the Component to be represented as a View at mount time if it wasn't going to already.