Components should implement an event of this type in order to receive Android touch events. The
method is equivalent to the Android method
View#onTouchEvent(MotionEvent)
-
implementations should return true if they consumed the event and wish to receive subsequent
events, and false otherwise. An example of the correct usage is:
@OnEvent(TouchEvent.class)
static boolean onTouch(
@FromEvent View view,
@FromEvent MotionEvent motionEvent,
@Param Param someParam,
@Prop Prop someProp) {
if (shouldHandleEvent(someParam, someProp)) {
handleEvent(view, motionEvent);
return true;
}
return false;
}