AI-generated Key Takeaways
-
Scene.OnPeekTouchListeneris an interface used to receive callbacks for touch events on a Scene, prior to theScene.OnTouchListener. -
This listener is triggered for all motion events, even if consumed by another gesture, allowing observation of all touch interactions.
-
The
onPeekTouchmethod provides details about the touch, including theHitTestResult(indicating the touched node, if any) and theMotionEvent. -
ArFragment and BaseArFragment are indirect subclasses that implement or utilize this interface for AR interactions.
| Known Indirect Subclasses |
Interface definition for a callback to be invoked when a touch event is dispatched to a scene.
The callback will be invoked before the Scene.OnTouchListener is invoked. This is invoked
even if the gesture was consumed, making it possible to observe all motion events dispatched to
the scene.
Public Methods
| abstract void |
onPeekTouch(HitTestResult hitTestResult, MotionEvent motionEvent)
Called when a touch event is dispatched to a scene.
|
Public Methods
public abstract void onPeekTouch (HitTestResult hitTestResult, MotionEvent motionEvent)
Called when a touch event is dispatched to a scene. The callback will be invoked before the
Scene.OnTouchListener is invoked. This is invoked even if the gesture was consumed, making
it possible to observe all motion events dispatched to the scene. This is called even if the
touch is not over a node, in which case getNode() will be null.
Parameters
| hitTestResult | represents the node that was touched |
|---|---|
| motionEvent | the motion event |