Starting March 27, 2025, we recommend using android-latest-release instead of aosp-main to build and contribute to AOSP. For more information, see Changes to AOSP.
Implement advanced windowing
Stay organized with collections
Save and categorize content based on your preferences.
This section describes optimal uses of Scalable UI.
- Create persistent multipanel layouts
- Implement a dynamic home scene
- Apply contextual overlays
- Design complex panel interactions
Enable the feature
Set the required flag in your System UI configuration file (config.xml or
similar):
<boolname="config_enableScalableUI">true</bool>
Verify the system configuration
Verify that your system includes the required feature and disables any legacy or conflicting windowing features:
The system must include the feature,
android.software.car.splitscreen_multitaskingConfirm that any legacy windowing or split-screen features that conflict with the new root-task model are disabled.
Define panels and variants
To declare all the config files that contain Panel configurations, add an
array resource named window_states.
To address role mapping, Panels must use the role attribute to be mapped to
the apps they host. role references an array of component names, such as
role="@array/nav_components.
Define transitions
Within each Panel definition, define the transitions by mapping system or custom Events to a target Variant. For example, to define behavior for the navigation panel:
<Transitions>
<TransitiononEvent="_System_TaskOpenEvent"toVariant="@id/opened"/>
<TransitiononEvent="_System_HomeEvent"toVariant="@id/closed"/>
<TransitiononEvent="@string/event_system_nav_focus_lost"toVariant="@id/minimized"/>
</Transitions>