Stay organized with collections
Save and categorize content based on your preferences.
public final class ActivityPanelEntity extends PanelEntity
ActivityPanelEntity creates a spatial panel for embedding an Activity in Android XR. Users can either use an Intent to launch an Activity in the given panel or provide an instance of Activity to move into this panel. In order to launch and embed an activity, SpatialCapability.EMBED_ACTIVITY capability is required. Calling Entity.dispose on this Entity will destroy the underlying Activity.
Summary
Public methods |
static final @NonNull ActivityPanelEntity |
Public factory function for a spatial ActivityPanelEntity.
|
final void |
Starts an Activity in the given panel.
|
final void |
Transfers the given Activity into this panel.
|
Inherited methods |
From androidx.xr.scenecore.BaseEntity
void |
Sets an Entity to be a child of this Entity in the scene graph.
|
boolean |
Adds a Component to this Entity.
|
void |
Disposes of any system resources held by this Entity, and transitively calls dispose() on all its children.
|
float |
Returns the alpha transparency set for this Entity, relative to given Space.
|
@NonNull List<@NonNull Entity> |
Provides the list of all children of this entity.
|
@NonNull List<@NonNull Component> |
Retrieves all components attached to this Entity.
|
@NonNull List<@NonNull T> |
Retrieves all Components of the given type T and its sub-types attached to this Entity.
|
@NonNull CharSequence |
Alternate text for this Entity to be consumed by Accessibility systems.
|
Entity |
The parent of this Entity, from which this Entity will inherit most of its properties.
|
@NonNull Pose |
Returns the Pose for this Entity, relative to the provided Space.
|
float |
Returns the scale of this entity, relative to given space.
|
boolean |
Returns the enabled status of this Entity.
|
void |
Remove all components from this Entity.
|
void |
Removes the given Component from this Entity.
|
void |
Sets the alpha transparency of the Entity relative to given Space.
|
void |
Alternate text for this Entity to be consumed by Accessibility systems.
|
void |
Sets the local enabled state of this Entity.
|
void |
The parent of this Entity, from which this Entity will inherit most of its properties.
|
void |
Sets the Pose for this Entity.
|
void |
Sets the scale of this Entity relative to the given Space.
|
|
From androidx.xr.scenecore.Entity
@FloatRange(from = 0.0, to = 1.0) float |
Returns the alpha transparency set for this Entity.
|
@NonNull Pose |
Returns the Pose for this Entity, relative to its parent.
|
@FloatRange(from = 0.0) float |
Returns the local scale of this Entity, not inclusive of the parent's scale.
|
void |
Sets the alpha transparency of the Entity and its children.
|
void |
Sets the Pose for this Entity, relative to its parent.
|
void |
Sets the scale of this Entity relative to its parent.
|
|
From androidx.xr.scenecore.PanelEntity
final float |
The corner radius of the PanelEntity, in meters.
|
final @NonNull PerceivedResolutionResult |
Gets the perceived resolution of this Entity in the CameraView.
|
final @NonNull FloatSize2d |
The dimensions of this PanelEntity in local space, in units relative to the scale of this Entity's parent.
|
final @NonNull IntSize2d |
The dimensions of this PanelEntity, in pixels, which is the resolution of the underlying surface.
|
final boolean |
True if this panel is the MainPanelEntity, false otherwise.
|
final void |
The corner radius of the PanelEntity, in meters.
|
final void |
The dimensions of this PanelEntity in local space, in units relative to the scale of this Entity's parent.
|
final void |
The dimensions of this PanelEntity, in pixels, which is the resolution of the underlying surface.
|
final @NonNull Pose |
Gets the 3D pose of a 2D normalized extent coordinate within the Entity's local space.
|
final @NonNull Pose |
Gets the 3D pose of a 2D pixel coordinate within the Entity's local space.
|
|
From androidx.xr.scenecore.ScenePose
abstract @NonNull Pose |
The current Pose relative to the activity space root.
|
abstract HitTestResult |
Perform a hit test from the specified origin in the specified direction into the Scene.
|
abstract HitTestResult |
Creates a hit test from the specified origin in the specified direction into the scene.
|
abstract @NonNull Pose |
Returns a Pose relative to this ScenePose, transformed into a Pose relative to the destination.
|
|
Public methods
public final void startActivity(@NonNull Intent intent)
Starts an Activity in the given panel. Subsequent calls to this method will replace the already existing Activity in the panel with the new one. The panel will not be visible until an Activity is successfully launched. This will fail if the Scene does not have the SpatialCapability.EMBED_ACTIVITY capability. This method will not provide any information about when the Activity successfully launches.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-12-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-12-03 UTC."],[],[]]