TtInformationControl
A reusable UI control that can be used for displaying information.
A schematic overview of the information control:
_____________________________________________________________
| ______ | O Primary text | |
| | | | O Secondary text | ____ |
| | | | O Tertiary text | Tail text | | |
| |_____| | ***** Rating bar text | |___| |
|___________|____________________________|___________________|
Head Main Tail
section section section
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.
Constructors
Properties
The image shown in the Head section
. This can be a layered image, for example an image with the text on top of it. If set to null
, the head image will not be displayed.
The type of the image shown in the Head section
.
The callback function for when the Tail section
is clicked. If set to null
, no callback will be triggered when a user clicks the Tail section
.
The Primary icon
within the Main section
. If set to null
, the primary icon will not be displayed.
The Primary text
within the Main section
. If set to null
, the primary text will not be displayed.
The appearance of the primary text in the Main section
. The default appearance is defined by CoreThemeR.attr.tt_title_text_style_m
.
The color of the primary text in the Main section
and the tint color of tail icon.
How many lines may be presented in the primary text area in the Main section
. The default maximum lines is 1.
The maximum allowable value of ttRatingBarValue. The default value is DEFAULT_RATING_BAR_MAXIMUM_VALUE.
The additional text displayed together with the rating bar. If the value is null
, the text will not be displayed.
The appearance of the rating bar text in the Main section
. The default appearance is defined by CoreThemeR.attr.tt_body_text_style_m
.
The color of the rating bar text in the Main section
.
The value represents the current rating. This value should be between 0 and ttRatingBarMaximumValue. If the value is null
, then the entire rating bar will be hidden.
The Secondary icon
within the Main section
. If set to null
, the secondary icon will not be displayed.
The Secondary text
within the Main section
. If set to null
, the secondary text will not be displayed.
The appearance of the secondary text in the Main section
. The default appearance is defined by CoreThemeR.attr.tt_body_text_style_m
.
The color of the secondary text in the Main section
.
How many lines may be presented in the secondary text area in the Main section
. The default maximum lines is 1.
The icon shown within the Tail section
. If set to null
, the icon will not be displayed.
The text shown within the Tail section
. If set to null
, the text will not be displayed.
The appearance of the tail text in the Tail section
. The default appearance is defined by CoreThemeR.attr.tt_body_text_style_m
.
The color of the tail text in the Tail section
.
How many lines may be presented in the tail text area in the Tail section
. The default maximum lines is 1.
The Tertiary icon
within the Main section
. If set to null
, the tertiary icon will not be displayed.
The Tertiary text
within the Main section
. If set to null
, the tertiary text will not be displayed.
The appearance of the tertiary text in the Main section
. The default appearance is defined by CoreThemeR.attr.tt_body_text_style_m
.
The color of the tertiary text in the Main section
.
How many lines may be presented in the tertiary text area in the Main section
. The default maximum lines is 1.
Functions
A function that allows to get ttPrimaryIcon original drawable.
A function that allows to get ttSecondaryIcon original drawable.
A function that allows to get ttTertiaryIcon original drawable.
A function that allows to get ttTertiaryIcon original drawable.
Convenience function to set ttHeadImage using ImageSource. If set to null
, the head image will not be displayed.
Convenience function to set ttHeadImage using RemoteImage. If set to null
, the head image will not be displayed.
Convenience function to set ttHeadImage using DrawableResolver. If set to null
, the head image will not be displayed.
Convenience function to set ttHeadImage and ttHeadImageType using ImageDescriptor. If set to null
, the head image will not be displayed.
Convenience function to set ttPrimaryIcon using DrawableResolver. If set to null
, the primary icon will not be displayed.
Convenience function to set ttPrimaryText using StringResolver.
Convenience function to set ttRatingBarText using StringResolver.
Convenience function to set ttSecondaryIcon using DrawableResolver. If set to null
, the secondary icon will not be displayed.
Convenience function to set ttSecondaryText using StringResolver.
Convenience function to set ttTailIcon using DrawableResolver. If set to null
, the tail icon will not be displayed.
Convenience function to set ttTailText using StringResolver.
Convenience function to set ttTertiaryIcon using DrawableResolver. If set to null
, the tertiary icon will not be displayed.
Convenience function to set ttTertiaryText using StringResolver.
Inherited functions
Binds the given viewModel to a TtInformationControl. If viewModel is null
, the contents of TtInformationControl will be cleared.