- Sceneform SDK for Android
was open sourced and archived ( github.com/google-ar/sceneform-android-sdk
) with version 1.16.0.
- This site ( developers.google.com/sceneform
) serves as the documentation archive for the previous version, Sceneform SDK for Android
1.15.0.
- Do not use version 1.17.0 of the Sceneform Maven artifacts
.
- The 1.17.1 Maven artifacts can be used. Other than the version, however, the 1.17.1 artifacts are identical to the 1.15.0 artifacts.
Node.LifecycleListener
Stay organized with collections
Save and categorize content based on your preferences.
Known Indirect Subclasses
Interface definition for callbacks to be invoked when node lifecycle events occur.
Public Methods
abstract
void |
|
abstract
void |
|
abstract
void |
|
Public Methods
public
abstract
void
onActivated
( Node
node)
Parameters
node
the node that was activated
public
abstract
void
onDeactivated
( Node
node)
Parameters
node
the node that was deactivated
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-26 UTC."],[[["\u003cp\u003e\u003ccode\u003eNode.LifecycleListener\u003c/code\u003e is an interface for receiving callbacks during a node's lifecycle events.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to be notified when a node is activated (\u003ccode\u003eonActivated\u003c/code\u003e), deactivated (\u003ccode\u003eonDeactivated\u003c/code\u003e), and updated (\u003ccode\u003eonUpdated\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eThese methods receive the affected node as a parameter, and \u003ccode\u003eonUpdated\u003c/code\u003e also provides frame timing information.\u003c/p\u003e\n"],["\u003cp\u003eSeveral classes, like \u003ccode\u003eRotationController\u003c/code\u003e and \u003ccode\u003eScaleController\u003c/code\u003e, indirectly implement this interface.\u003c/p\u003e\n"]]],["`Node.LifecycleListener` is an interface for receiving callbacks on node lifecycle events. It has three methods: `onActivated`, which is called when `onActivate()` is invoked, `onDeactivated`, which is called upon `onDeactivate()`, and `onUpdated`, triggered by `onUpdate(FrameTime)`. These methods notify listeners about the respective lifecycle event, providing the involved `Node`, and time information. `BaseTransformationController` and its subclasses use the listener.\n"],null,["# Node.LifecycleListener\n\npublic static interface **Node.LifecycleListener** \n\n|---|---|---|\n| Known Indirect Subclasses [BaseTransformationController](/sceneform/reference/com/google/ar/sceneform/ux/BaseTransformationController)\\\u003cT extends [BaseGesture](/sceneform/reference/com/google/ar/sceneform/ux/BaseGesture)\\\u003cT\\\u003e\\\u003e, [RotationController](/sceneform/reference/com/google/ar/sceneform/ux/RotationController), [ScaleController](/sceneform/reference/com/google/ar/sceneform/ux/ScaleController), [TranslationController](/sceneform/reference/com/google/ar/sceneform/ux/TranslationController) |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [BaseTransformationController](/sceneform/reference/com/google/ar/sceneform/ux/BaseTransformationController)\\\u003cT extends [BaseGesture](/sceneform/reference/com/google/ar/sceneform/ux/BaseGesture)\\\u003cT\\\u003e\\\u003e | Manipulates the transform properties (i.e. | | [RotationController](/sceneform/reference/com/google/ar/sceneform/ux/RotationController) | Manipulates the rotation of a [BaseTransformableNode](/sceneform/reference/com/google/ar/sceneform/ux/BaseTransformableNode) using a [TwistGestureRecognizer](/sceneform/reference/com/google/ar/sceneform/ux/TwistGestureRecognizer). | | [ScaleController](/sceneform/reference/com/google/ar/sceneform/ux/ScaleController) | Manipulates the Scale of a [BaseTransformableNode](/sceneform/reference/com/google/ar/sceneform/ux/BaseTransformableNode) using a Pinch [PinchGestureRecognizer](/sceneform/reference/com/google/ar/sceneform/ux/PinchGestureRecognizer). | | [TranslationController](/sceneform/reference/com/google/ar/sceneform/ux/TranslationController) | Manipulates the position of a [BaseTransformableNode](/sceneform/reference/com/google/ar/sceneform/ux/BaseTransformableNode) using a [DragGestureRecognizer](/sceneform/reference/com/google/ar/sceneform/ux/DragGestureRecognizer). | |||\n\nInterface definition for callbacks to be invoked when node lifecycle events occur. \n\n### Public Methods\n\n|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract void | [onActivated](/sceneform/reference/com/google/ar/sceneform/Node.LifecycleListener#onActivated(com.google.ar.sceneform.Node))([Node](/sceneform/reference/com/google/ar/sceneform/Node) node) Notifies the listener that [onActivate()](/sceneform/reference/com/google/ar/sceneform/Node#onActivate()) was called. |\n| abstract void | [onDeactivated](/sceneform/reference/com/google/ar/sceneform/Node.LifecycleListener#onDeactivated(com.google.ar.sceneform.Node))([Node](/sceneform/reference/com/google/ar/sceneform/Node) node) Notifies the listener that [onDeactivate()](/sceneform/reference/com/google/ar/sceneform/Node#onDeactivate()) was called. |\n| abstract void | [onUpdated](/sceneform/reference/com/google/ar/sceneform/Node.LifecycleListener#onUpdated(com.google.ar.sceneform.Node,%20com.google.ar.sceneform.FrameTime))([Node](/sceneform/reference/com/google/ar/sceneform/Node) node, [FrameTime](/sceneform/reference/com/google/ar/sceneform/FrameTime) frameTime) Notifies the listener that [onUpdate(FrameTime)](/sceneform/reference/com/google/ar/sceneform/Node#onUpdate(com.google.ar.sceneform.FrameTime)) was called. |\n\nPublic Methods\n--------------\n\n#### public abstract void\n**onActivated**\n([Node](/sceneform/reference/com/google/ar/sceneform/Node) node)\n\nNotifies the listener that [onActivate()](/sceneform/reference/com/google/ar/sceneform/Node#onActivate()) was called. \n\n##### Parameters\n\n| node | the node that was activated |\n|------|-----------------------------|\n\n#### public abstract void\n**onDeactivated**\n([Node](/sceneform/reference/com/google/ar/sceneform/Node) node)\n\nNotifies the listener that [onDeactivate()](/sceneform/reference/com/google/ar/sceneform/Node#onDeactivate()) was called. \n\n##### Parameters\n\n| node | the node that was deactivated |\n|------|-------------------------------|\n\n#### public abstract void\n**onUpdated**\n([Node](/sceneform/reference/com/google/ar/sceneform/Node) node, [FrameTime](/sceneform/reference/com/google/ar/sceneform/FrameTime) frameTime)\n\nNotifies the listener that [onUpdate(FrameTime)](/sceneform/reference/com/google/ar/sceneform/Node#onUpdate(com.google.ar.sceneform.FrameTime)) was called. \n\n##### Parameters\n\n| node | the node that was updated |\n| frameTime | provides time information for the current frame |\n|-----------|-------------------------------------------------|"]]