LayoutXMLPanelRegistration
(
registrationId
, layoutIdCreator
, settingsCreator
, panelSetupWithRootView
)
| Parameters registrationId: Int
Unique identifier for this panel registration
layoutIdCreator: (Entity) -> Int
Function that returns the layout resource ID for each panel instance, allowing dynamic layout selection based on the entity
settingsCreator: (Entity) -> PanelSettings
Function that creates PanelSettings for each panel instance, allowing dynamic panel configuration (size, position, etc.)
panelSetupWithRootView: Function3
Optional setup function called after panel creation with access to the inflated root View, PanelSceneObject, and Entity for additional configuration like setting up click listeners, binding data, etc.
Returns LayoutXMLPanelRegistration |
activityClass
: Class<*>?
[Get][Set] |
Activity class if the panel is powered by an activity and its layout/logic.
Signature
var activityClass: Class<*>? |
init
: PanelRegistration.(Entity) -> Unit
[Get] |
The initialization block that will be called when the panel is created
Signature
val init: PanelRegistration.(entity: Entity) -> Unit |
layoutResourceId
: Int?
[Get][Set] |
Layout resource id if the panel is view-based and created in the same immersive activity.
Signature
var layoutResourceId: Int? |
panelIntent
: Intent?
[Get][Set] |
Intent to launch the panel's activity if the panel is activity-based.
Signature
var panelIntent: Intent |
registrationId
: Int
[Get] |
The unique identifier for this panel
Signature
val registrationId: Int |
config
(
overriding
, block
)
|
Signature
fun config(overriding: Boolean = true, block: PanelConfigOptions.() -> Unit): PanelRegistration Parameters overriding: Booleanblock: PanelConfigOptions.() -> UnitReturns PanelRegistration |
panel
(
overriding
, block
)
|
Signature
fun panel(overriding: Boolean = true, block: PanelSceneObject.() -> Unit): PanelRegistration Parameters overriding: Booleanblock: PanelSceneObject.() -> UnitReturns PanelRegistration |
panelComponent
()
| |
panelCreator
(
scene
, spatialContext
)
|
Returns a function that takes an entity as input and returns a PanelSceneObject. This function will be used to create the panel scene object in PanelCreationSystem. Whenever you create Entity with Panel(registrationId) component, this function will be called to create the panel scene object.
Signature
open override fun panelCreator(
scene: Scene,
spatialContext: SpatialContext,
): (entity: Entity) -> PanelSceneObjectParameters Returns (Entity) -> PanelSceneObject
A function that takes an entity as input and returns a PanelSceneObject.
|
view
(
block
)
| Parameters block: Function1Returns PanelRegistration |