TouchEvent

open class TouchEvent

Components should implement an event of this type in order to receive Android touch events. The method is equivalent to the Android method onTouchEvent - 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;
}

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Link copied to clipboard
open var view: View