WindowContainer

fun SpatialAppScope.WindowContainer(id: String, form: Form? = null, defaultSize: WindowContainerSize? = null, resizeType: ContainerResizeType? = null, defaultResizeRestriction: ContainerResizeRestriction? = null, enableMaterialBackground: Boolean? = null, volumeAlignment: VolumeAlignment? = null, defaultVolumeBasePanelType: VolumeBasePanelType? = null, defaultCaptionBarType: CaptionBarType? = null, placement: PlacementContext.() -> Placement? = null, targetActivity: Class<out ComponentActivity>? = null, worldScale: WorldScale? = null, content: @Composable WindowContainerScope.() -> Unit)

Declare a WindowContainer with unique id. the id is used to open/close the WindowContainer.

WindowContainer is a window-like container provides by PICO OS.

Currently, every WindowContainer is associated with a single android.app.Activity

Parameters

id

The WindowContainer id.

form

Style of the WindowContainer, could be one of Form.Planar and Form.Volumetric

defaultSize

The WindowContainerSize to define the WindowContainer's size.

resizeType

The ContainerResizeType of this WindowContainer, defines how this WindowContainer can be resized.

defaultResizeRestriction

The default ContainerResizeRestriction of this WindowContainer when form is Form.Planar, specifying the initial resizing behavior applied when the window is first created.

enableMaterialBackground

Whether to enable material background for WindowContainer. If the value is true, the material will be Material.Regular.

volumeAlignment

the VolumeAlignment of the WindowContainer when the form is Form.Volumetric

defaultVolumeBasePanelType

Whether show the base panel for the WindowContainer when the form is Form.Volumetric

defaultCaptionBarType

Whether the caption bar should automatically hide

placement

The Placement of the WindowContainer when it is created.

targetActivity

The activity to launch when this WindowContainer is opened.

worldScale
content

Receives a Composable to display app content, will be called after WindowContainer is opened.


fun SpatialAppScope.WindowContainer(id: String, form: Form? = null, properties: ContainerProperties.() -> Unit = {}, content: @Composable WindowContainerScope.() -> Unit)

Declare a WindowContainer with unique id. the id is used to open/close the WindowContainer.

WindowContainer is a window-like container provides by PICO OS.

Currently, every WindowContainer is associated with a single android.app.Activity

You can update container's properties dynamically by using properties function.

Parameters

id

The WindowContainer id.

form

Style of the WindowContainer, could be one of Form.Planar and Form.Volumetric

properties
content

Receives a Composable to display app content, will be called after WindowContainer is opened.