DelegatableSubspaceNode

interface DelegatableSubspaceNode

Known direct subclasses
CompositionLocalConsumerSubspaceModifierNode

Implementing this interface allows your SubspaceModifier.Node subclass to read CompositionLocals via the currentValueOf function.

ParentLayoutParamsModifier

Interface for modifiers that can adjust the layout parameters of a composable that implements ParentLayoutParamsAdjustable.

SubspaceLayoutAwareModifierNode

A DelegatableSubspaceNode whose onPlaced callback is invoked when the layout coordinates of the layout node may have changed.

SubspaceLayoutModifierNode

A specialized SubspaceModifier.Node responsible for modifying the measurement and layout behavior of its wrapped content within the Subspace environment.

SubspaceModifier.Node

The longer-lived object that is created for each SubspaceModifierNodeElement applied to a SubspaceLayout


Represents a SubspaceModifier.Node which can be a delegate of another SubspaceModifier.Node. Since SubspaceModifier.Node implements this interface, in practice any SubspaceModifier.Node can be delegated.

This interface is conceptually similar to androidx.compose.ui.node.DelegatableNode from 2D Compose, but it intentionally exposes a minimal subset of functionality to meet current Jetpack XR Compose requirements. This approach aims to reduce complexity and avoid prematurely adopting concepts from 2D Compose that may not apply or may have different implications in a 3D context.

For example, callbacks like onDensityChange or onLayoutDirectionChange found in the 2D version are not currently included.

This design choice follows guidance to tailor the API to the specific needs of XR and avoid unnecessary inherited complexity (see b/483999028 for API review context).

If additional capabilities from 2D Compose are needed in the future, they can potentially be added to this interface. To maintain backward compatibility, such additions should provide default implementations, avoiding breaking changes for external implementations. In the meantime, users requiring more advanced node access can often utilize extension functions like requireCoordinator and requireOwner, or directly access properties on SubspaceModifier.Node.

Summary

Public properties

SubspaceModifier.Node

A reference of the SubspaceModifier.Node that holds this node's position in the node hierarchy.

Public properties

node

Added in 1.0.0-alpha13
val nodeSubspaceModifier.Node

A reference of the SubspaceModifier.Node that holds this node's position in the node hierarchy. If the node is a delegate of another node, this will point to the root delegating node that is actually part of the node tree. Otherwise, this will point to itself.