Composable Function

SubspaceLayout

SubspaceLayout is the main component for laying out leaf nodes with zero children.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

SubspaceLayout

Android
@SubspaceComposable
@Composable
public inline fun SubspaceLayout(
    modifier: SubspaceModifier = SubspaceModifier,
    measurePolicy: SubspaceMeasurePolicy,
)

SubspaceLayout is the main component for laying out leaf nodes with zero children.

The measurement, layout and intrinsic measurement behaviors of this layout will be defined by the SubspaceMeasurePolicy instance. See SubspaceMeasurePolicy for more details.

Parameters

modifier SubspaceModifier to apply during layout.
measurePolicy a policy defining the measurement and positioning of the layout.

SubspaceLayout

Android
@SubspaceComposable
@Composable
public inline fun SubspaceLayout(
    crossinline content: @Composable @SubspaceComposable () -> Unit,
    modifier: SubspaceModifier = SubspaceModifier,
    coreEntityName: String = "Entity",
    measurePolicy: SubspaceMeasurePolicy,
)

SubspaceLayout is the main core component for layout. It can be used to measure and position zero or more layout children.

The measurement, layout and intrinsic measurement behaviors of this layout will be defined by the SubspaceMeasurePolicy instance. See SubspaceMeasurePolicy for more details.

Parameters

modifier SubspaceModifier to apply during layout
content the child composables to be laid out.
coreEntityName A name for the underlying androidx.xr.scenecore.GroupEntity that is created to host the content of this layout. This name is used for debugging and identification purposes; it will appear in scene graph inspectors, making it easier to correlate this composable with its corresponding node in the 3D scene.
measurePolicy a policy defining the measurement and positioning of the layout.