An action communicates Scalable UI events between System UI and other system apps to launch apps or to orchestrate UI behavior in response to specific system events.
An action is a configuration construct, independent of any specific UI panel associations. An action consists of a required intent, which is dispatched when triggered by an event.
You use actions to broadcast intents in response to events.
The Scalable UI manages and dispatches action objects based on incoming events. When an event is handled, the Scalable UI verifies that an action's trigger condition is met by the event and sends an ordered broadcast with the intent associated with the action. Actions:
Decouple panel definition and app launch logic: Actions separate the static definition of UI panels from the dynamic logic that governs how apps are launched within them. This gives you full control over when to launch
intents, regardless of panel states.Reduce custom development: Actions provide you with a configurable and code-free solution for launching apps.
Streamline panel initialization: Actions provide standardized logic to initiate apps in response to common system events, including to start navigation.
Improve system performance with lazy loading: Actions facilitate the lazy loading of apps, which can enhance perceived responsiveness and overall system performance. Actions can also provide more control over which apps to launch at boot time.
Facilitate the adaptation of a dynamic UI: Triggers, part of actions, let you communicate and orchestrate Scalable UI states external to the core system UI app. As a result, you get dynamic UI adaptation.
XML attributes
Actions are defined externally, typically in an XML file, and loaded in to the
Scalable UI. The complete action configuration is persistently stored in
xml/scalable_ui_actions.xml
. Only one such file is permitted per system
instance. Any other definitions are ignored.
Attribute | Description |
---|---|
<Action> |
The <Actions> tag is the top-level container for a
list of actions. Each <Action> definition can have
mandatory and optional properties.
|
XML child elements
Attribute | Description |
---|---|
<Event> |
Describes the properties of the event that can trigger this action.
Multiple event children can be specified per action. The action is triggered
when at least one of its events is a match.
|
Event matching
Actions use an event-matching mechanism similar to that for transitions.