Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
Documentation
Main Screen Templates

Main Screen Templates

Each head unit manufacturer supports a set of user interface templates. These templates determine the position and size of the text, images, and buttons on the screen. Once the app has connected successfully with an SDL enabled head unit, a list of supported templates is available on sdlManager.getSystemCapabilityManager().getDefaultMainWindowCapability().getTemplatesAvailable().

Change the Template

To change a template at any time, use ScreenManager.changeLayout(). This guide requires SDL Java Suite version 5.0. If using an older version, use the SetDisplayLayout RPC.

Note

When changing the layout, you may get an error or failure if the update is "superseded." This isn't technically a failure, because changing the layout has not yet been attempted. The layout or batched operation was cancelled before it could be completed because another operation was requested. The layout change will then be inserted into the future operation and completed then.

TemplateConfiguration templateConfiguration = new TemplateConfiguration().setTemplate(PredefinedLayout.GRAPHIC_WITH_TEXT.toString());
sdlManager.getScreenManager().changeLayout(templateConfiguration, new CompletionListener() {
    @Override
    public void onComplete(boolean success) {
        if (success) {
            DebugTool.logInfo(TAG, "Layout set successfully");
        } else {
            DebugTool.logInfo(TAG, "Layout not set successfully");
        }
    }
});

Template changes can also be batched with text and graphics updates:

sdlManager.getScreenManager().beginTransaction();
sdlManager.getScreenManager().setTextField1("Line of Text");
sdlManager.getScreenManager().changeLayout(templateConfiguration, new CompletionListener() {
    @Override
    public void onComplete(boolean success) {
        // This listener will be ignored, and will use the CompletionListener sent in commit.
    }
});
sdlManager.getScreenManager().setPrimaryGraphic(sdlArtwork);
sdlManager.getScreenManager().commit(new CompletionListener() {
    @Override
    public void onComplete(boolean success) {
        if (success) {
            DebugTool.logInfo(TAG, "The data and template have been set successfully");
        }
    }
});

Available Templates

There are fifteen standard templates to choose from, however some head units may only support a subset of these templates. The following examples show how templates will appear on the Generic HMI and Ford's SYNC® 3 HMI.

Media

Generic - Media without progress bar

Media (with a Progress Bar)

Generic - Media with progress bar

Non-Media

Generic - Non-Media

Graphic with Text

Generic - Graphic with Text

Text with Graphic

Generic - Text with Graphic

Tiles Only

Generic - Tiles Only

Graphic with Tiles

SYNC® 3 - Graphic with Tiles

Tiles with Graphic

SYNC® 3 - Tiles with Graphic

Graphic with Text and Soft Buttons

SYNC® 3 - Graphic with Text and Soft Buttons

Text and Soft Buttons with Graphic

SYNC® 3 Text and Soft Buttons with Graphic

Graphic with Text Buttons

Generic - Graphic with Text Buttons

Double Graphic with Soft Buttons

Generic - Double Graphic with Softbuttons

Text Buttons with Graphic

Generic - Text Buttons with Graphic

Text Buttons Only

Generic - Text Buttons Only

Large Graphic with Soft Buttons

Generic - Large Graphic with Softbuttons

Large Graphic Only

Generic - Large Graphic Only

View on GitHub.com
Previous Section Next Section