public static interface
Node.OnTouchListener
Interface definition for a callback to be invoked when a touch event is dispatched to this
node. The callback will be invoked before onTouchEvent(HitTestResult, MotionEvent)
is
called.
Public Methods
abstract boolean |
onTouch(HitTestResult hitTestResult, MotionEvent motionEvent)
Handles when a touch event has been dispatched to a node.
|
Public Methods
public abstract boolean onTouch (HitTestResult hitTestResult, MotionEvent motionEvent)
Handles when a touch event has been dispatched to a node.
On ACTION_DOWN
events, getNode()
will always be
this node or one of its children. On other events, the touch may have moved causing the
getNode()
to change (or possibly be null).
Parameters
hitTestResult | represents the node that was touched and information about where it was touched |
---|---|
motionEvent | the MotionEvent object containing full information about the event |
Returns
- true if the listener has consumed the event, false otherwise