You can easily display text, images, and buttons using the ScreenManager
. To update the UI, simply give the manager your new data and (optionally) sandwich the update between the manager's beginTransaction()
and commit()
methods.
ScreenManager Parameter Name | Description |
---|---|
textField1 | The text displayed in a single-line display, or in the upper display line of a multi-line display |
textField2 | The text displayed on the second display line of a multi-line display |
textField3 | The text displayed on the third display line of a multi-line display |
textField4 | The text displayed on the bottom display line of a multi-line display |
mediaTrackTextField | The text displayed in the in the track field; this field is only valid for media applications |
textAlignment | The text justification for the text fields; the text alignment can be left, center, or right |
textField1Type | The type of data provided in textField1 |
textField2Type | The type of data provided in textField2 |
textField3Type | The type of data provided in textField3 |
textField4Type | The type of data provided in textField4 |
title | The title of the displayed template |
sdlManager.getScreenManager().beginTransaction(); sdlManager.getScreenManager().setTextField1("Line 1 of Text"); sdlManager.getScreenManager().setTextField2("Line 2 of Text"); sdlManager.getScreenManager().commit(new CompletionListener() { @Override public void onComplete(boolean success) { DebugTool.logInfo(TAG, "ScreenManager update complete: " + success); } });
To remove text from the screen simply set the screen manager property to null
.
sdlManager.getScreenManager().setTextField1(null); sdlManager.getScreenManager().setTextField2(null);