TtInformationControlViewModel

data class TtInformationControlViewModel(headImage: ImageDescriptor?, primaryText: StringResolver?, primaryIcon: DrawableResolver?, secondaryText: StringResolver?, secondaryIcon: DrawableResolver?, tertiaryText: StringResolver?, tertiaryIcon: DrawableResolver?, onClick: () -> Unit?, ratingBarValue: Float?, ratingBarMaximumValue: Int, ratingBarText: StringResolver?, tailText: StringResolver?, tailIcon: DrawableResolver?, onTailSectionClick: () -> Unit?)

The ViewModel used to populate TtInformationControl.

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

Constructors

Link copied to clipboard
fun TtInformationControlViewModel(headImage: ImageDescriptor? = null, primaryText: StringResolver? = null, primaryIcon: DrawableResolver? = null, secondaryText: StringResolver? = null, secondaryIcon: DrawableResolver? = null, tertiaryText: StringResolver? = null, tertiaryIcon: DrawableResolver? = null, onClick: () -> Unit? = null, ratingBarValue: Float? = null, ratingBarMaximumValue: Int = DEFAULT_RATING_BAR_MAXIMUM_VALUE, ratingBarText: StringResolver? = null, tailText: StringResolver? = null, tailIcon: DrawableResolver? = null, onTailSectionClick: () -> Unit? = null)

Properties

Link copied to clipboard
val headImage: ImageDescriptor? = null

The image shown in the Head section. This can be a layered image, e.g. an image with the text on top of it.

Link copied to clipboard
val onClick: () -> Unit? = null

The callback function for when the Head section or Main section is clicked.

Link copied to clipboard
val onTailSectionClick: () -> Unit? = null

The callback function for when the Tail section is clicked.

Link copied to clipboard
val primaryIcon: DrawableResolver? = null

The Primary icon within the Main section. If set to null, the primary icon will not be displayed.

Link copied to clipboard
val primaryText: StringResolver? = null

The Primary text within the Main section. If set to null, the primary text will not be displayed.

Link copied to clipboard
val ratingBarMaximumValue: Int

The maximum allowable value of ratingBarValue. The default value is DEFAULT_RATING_BAR_MAXIMUM_VALUE.

Link copied to clipboard
val ratingBarText: StringResolver? = null

The additional text displayed together with the rating bar. If the value is null the text will not be displayed.

Link copied to clipboard
val ratingBarValue: Float? = null

The value represents the current rating. This value should be between 0 and ratingBarMaximumValue. If the value is null, then the entire rating bar will be hidden.

Link copied to clipboard
val secondaryIcon: DrawableResolver? = null

The Secondary icon within the Main section. If set to null, the secondary icon will not be displayed.

Link copied to clipboard
val secondaryText: StringResolver? = null

The Secondary text within the Main section. If set to null, the secondary text will not be displayed.

Link copied to clipboard
val tailIcon: DrawableResolver? = null

The icon shown within the Tail section.

Link copied to clipboard
val tailText: StringResolver? = null

The text shown within the Tail section.

Link copied to clipboard
val tertiaryIcon: DrawableResolver? = null

The Tertiary icon within the Main section. If set to null, the tertiary icon will not be displayed.

Link copied to clipboard
val tertiaryText: StringResolver? = null

The Tertiary text within the Main section. If set to null, the tertiary text will not be displayed.