Skip to main content

MaestroCorePanel

Shows the panels a core SDK session's config carries.

Overview​

MaestroCorePanel is a Jetpack Compose composable that draws the panels the page config enables, one tab each. It marks the panel visible while it is on screen and hidden when it leaves the screen or your Activity pauses. Back on the tabs calls shouldHidePanel() on your delegate, so draw it only while your panel should be visible. It draws with MaestroCoreTheme unless you pass your own theme; to customize, start from MaestroCoreTheme.copy(...).

Syntax​

@Composable
fun MaestroCorePanel(
sdk: CoreMaestroSDK.Instance,
modifier: Modifier = Modifier,
theme: MaestroThemeData = MaestroCoreTheme,
)

Parameters​

ParameterTypeDescription
sdkCoreMaestroSDK.InstanceThe session returned by configure()
modifierModifierModifier applied to the panel. Defaults to Modifier.
themeMaestroThemeDataTheme the panel draws with. Defaults to MaestroCoreTheme.

Example​

Box(modifier = Modifier.fillMaxSize()) {
YourPlayerContent()
if (panelVisible) {
MaestroCorePanel(
sdk = sdk,
modifier = Modifier
.width(300.dp)
.fillMaxHeight()
.align(Alignment.CenterEnd),
)
}
}