Interface Scene.OnTouchListener

  • Enclosing class:
    Scene

    public static interface Scene.OnTouchListener
    Interface definition for a callback to be invoked when a touch event is dispatched to a scene. The callback will be invoked after the touch event is dispatched to the nodes in the scene if no node consumed the event.
    • Method Detail

      • onSceneTouch

        boolean onSceneTouch​(HitTestResult hitTestResult,
                             android.view.MotionEvent motionEvent)
        Called when a touch event is dispatched to a scene. The callback will be invoked after the touch event is dispatched to the nodes in the scene if no node consumed the event. This is called even if the touch is not over a node, in which case HitTestResult.getNode() will be null.
        Parameters:
        hitTestResult - represents the node that was touched
        motionEvent - the motion event
        Returns:
        true if the listener has consumed the event
        See Also:
        Scene.setOnTouchListener(OnTouchListener)