SubspaceLayoutAwareModifierNode

interface SubspaceLayoutAwareModifierNode : SubspaceMeasuredSizeAwareModifierNode


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

Summary

Public functions

open Unit

onPlaced is called after the parent androidx.xr.compose.subspace.layout.SubspaceModifier and parent layout has been placed and before child androidx.xr.compose.subspace.layout.SubspaceModifier is placed.

open Unit

This method is called when the layout content is remeasured.

Inherited properties

From androidx.xr.compose.subspace.layout.DelegatableSubspaceNode
SubspaceModifier.Node

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

Public functions

onPlaced

Added in 1.0.0-alpha14
open fun onPlaced(coordinates: SubspaceLayoutCoordinates): Unit

onPlaced is called after the parent androidx.xr.compose.subspace.layout.SubspaceModifier and parent layout has been placed and before child androidx.xr.compose.subspace.layout.SubspaceModifier is placed. This allows child androidx.xr.compose.subspace.layout.SubspaceModifier to adjust its own placement based on where the parent is.

Parameters
coordinates: SubspaceLayoutCoordinates

The layout coordinates of the node.

onRemeasured

open fun onRemeasured(size: IntVolumeSize): Unit

This method is called when the layout content is remeasured. The most common usage is androidx.xr.compose.subspace.layout.onSizeChanged.