ControlCenterPanelSystemUiHostExtension
class ControlCenterPanelSystemUiHostExtension(systemUiHostExtensionContext: SystemUiHostExtensionContext, controlCenterPanels: LiveData<PanelList<ControlCenterPanel>>) : SystemUiHostExtension
SystemUiHostExtension for the stock system UI behavior for the control center panel.
This SystemUiHostExtension binds the ControlCenterPanelSystemUiViewModel instance to the controlCenterPanelViewModel
binding data variable.
System UI layouts can define the following to use the bound view model:
<data>
<import type="com.tomtom.ivi.platform.frontend.api.common.frontend.panels.ControlCenterPanel" />
<variable
name="controlCenterPanelViewModel"
type="com.tomtom.ivi.platform.systemui.api.stock.systemuihost.extensions.ControlCenterPanelSystemUiViewModel" />
</data>
Content copied to clipboard
Example for using the controlCenterPanelViewModel
variable:
<com.tomtom.ivi.platform.systemui.api.common.systemuihost.panelcontainer.SinglePanelContainer
android:id="@+id/ttivi_control_center_system_status_driver_container"
auto:ttiviPanelContainerContext="@{panelContainerContext}"
auto:ttiviPanelContainerData="@{controlCenterPanelViewModel.getControlCenterPanel(ControlCenterPanel.Type.SYSTEM_STATUS_DRIVER)}" />
Content copied to clipboard
Parameters
systemUiHostExtensionContext
The SystemUiHostExtensionContext of the SystemUiHost.
controlCenterPanels
The active ControlCenterPanels.
Constructors
Link copied to clipboard
fun ControlCenterPanelSystemUiHostExtension(systemUiHostExtensionContext: SystemUiHostExtensionContext, controlCenterPanels: LiveData<PanelList<ControlCenterPanel>>)