SpatialActivityPanel
Source set: Android
@Composable
public fun SpatialActivityPanel(
controller: SpatialActivityPanelController,
modifier: SubspaceModifier = SubspaceModifier,
shape: SpatialShape = SpatialPanelDefaults.shape,
)
Creates a SpatialActivityPanel that launches and displays an Activity within it.
This SpatialActivityPanel can render any Activity that the application has permission to invoke as an embedded activity.
The panel size is determined solely by the layout constraints and the provided modifier it does not resize based on the activity content.
Parameters
| controller | The SpatialActivityPanelController used to manage the Activities displayed within this panel. It provides a mechanism to queue and dispatch android.content.Intents to the embedded Activity environment. |
| modifier | SubspaceModifiers to apply to the SpatialPanel. The layout size of the panel will dictate the viewport size allocated to the embedded Activity. |
| shape | The shape of this Spatial Panel. |
SpatialActivityPanel
Source set: Android
@Composable
@Deprecated(
message =
"The `Intent` parameter has been replaced with a `SpatialActivityPanelController` to make" +
" launching additional activities more explicit. Additionally, `dragPolicy` and " +
"`resizePolicy` are now specified by modifiers. Use the overload of " +
"`SpatialActivityPanel` that accepts a `SpatialActivityPanelController`, and migrate " +
"your drag and resize policy to use the `SubspaceModifier.movable()` and " +
"`SubspaceModifier.resizable()` modifiers."
)
public fun SpatialActivityPanel(
intent: Intent,
modifier: SubspaceModifier = SubspaceModifier,
shape: SpatialShape = SpatialPanelDefaults.shape,
interactionPolicy: InteractionPolicy? = null,
)
Creates a SpatialActivityPanel and launches an Activity within it.
The only supported use case for this SpatialPanel is to launch activities that are a part of the same application.
Parameters
| intent | The intent of an Activity to launch within this panel. |
| modifier | SubspaceModifiers to apply to the SpatialPanel. The depth field in size-based modifiers affects this panel's layout size, but will not affect how the panel is rendered. The rendered shape will be a flat rectangle that is positioned on the front face of the rectangular prism created by the layout size. |
| shape | The shape of this Spatial Panel. |
| interactionPolicy | An optional InteractionPolicy that can be set to detect 3D input events. Setting this will not intercept 2D input events and is intended to provide additional spatial input information. |