Package pro.streem.ar.sceneform
Interface Node.OnTouchListener
-
- Enclosing class:
- Node
public static interface Node.OnTouchListenerInterface definition for a callback to be invoked when a touch event is dispatched to this node. The callback will be invoked beforeNode.onTouchEvent(HitTestResult, MotionEvent)is called.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanonTouch(HitTestResult hitTestResult, android.view.MotionEvent motionEvent)Handles when a touch event has been dispatched to a node.
-
-
-
Method Detail
-
onTouch
boolean onTouch(HitTestResult hitTestResult, android.view.MotionEvent motionEvent)
Handles when a touch event has been dispatched to a node.On
MotionEvent.ACTION_DOWNevents,HitTestResult.getNode()will always be this node or one of its children. On other events, the touch may have moved causing theHitTestResult.getNode()to change (or possibly be null).- Parameters:
hitTestResult- represents the node that was touched and information about where it was touchedmotionEvent- the MotionEvent object containing full information about the event- Returns:
- true if the listener has consumed the event, false otherwise
-
-