TtBanner
The banner UI control is used for in-place informational message. It can be placed next to other content to provide the user with contextual information.
A schematic overview of the banner:
______________________________________________________
| ______ | | |
| | | | Primary text | Action label |
| |____ | | Secondary text | |
|___________|________________________|________________|
All theme attributes used by this control are declared in com.tomtom.tools.android.core.theme
. To use this control, it is mandatory to define these attribute values.
Parameters
The display context.
The attribute set provided in the layout XML file.
The default style attribute set. The default value is CoreThemeR.attr.tt_banner_style
.
Constructors
Properties
The maximum amount of pixels that the banner will be wide.
The action to perform while clicking on ttActionLabel.
A clickable label shown at the end of the banner. When clicked, onActionLabelClicked will be called.
The color of the action label text.
A drawable to be displayed in front of the banner. When set to null
, no drawable is shown.
The ImageType of the drawable displayed in front of the banner. The default value is ImageType.DEFAULT.
The primary text displayed in the banner.
The color of the primary text.
The secondary text displayed in the banner.
The color of the secondary text.
Functions
Sets the given StringResolver which applies to ttActionLabel. When set to null
, ttActionLabel is cleared.
Sets a drawable to be displayed in front of the banner. When set to null
, no drawable is shown.
Sets a drawable resource to be displayed in front of the banner. When set to null
, no drawable is shown.
Sets the given StringResolver which applies to ttPrimaryText. When set to null
, ttPrimaryText is cleared.
Sets the given StringResolver which applies to ttSecondaryText. When set to null
, ttSecondaryText is cleared.
Sets an icon to be displayed in front of the banner. And the icon will be tinted by the text color of ttPrimaryText. It's suggested to choose the icon carefully, usually with the white background color, to make the drawable look good. When set to null
, no drawable is shown.
Sets an icon resource to be displayed in front of the banner. And the icon will be tinted by the text color of ttPrimaryText. It's suggested to choose the icon carefully, usually with the white background color, to make the drawable look good. When set to null
, no drawable is shown.