ListTemplateItem

class ListTemplateItem


The data required to display a list item.

An item can have brief title with an icon, detailed body text, categorical label, and associated action button. The whole list item can also have a separate action such as item selection.

The list style can indicate the level of details of what item elements to show deemed appropriate by developers. For example, Glance AppWidget developer might only show item icon when list header is displayed.

Summary

Public constructors

ListTemplateItem(
    textBlock: TextBlock,
    imageBlock: ImageBlock?,
    actionBlock: ActionBlock?
)

Public functions

open operator Boolean
equals(other: Any?)
open Int

Public properties

ActionBlock?

The item onClick action buttons defined by ActionBlock.

ImageBlock?

The image block for a list item defined by ImageBlock.

TextBlock

The text block for title, body, and other texts of the item.

Public constructors

ListTemplateItem

Added in 1.0.0-alpha06
ListTemplateItem(
    textBlock: TextBlock,
    imageBlock: ImageBlock? = null,
    actionBlock: ActionBlock? = null
)
Parameters
textBlock: TextBlock

The text block for title, body, and other texts of the item.

imageBlock: ImageBlock? = null

The image block for a list item defined by ImageBlock.

actionBlock: ActionBlock? = null

The item onClick action buttons defined by ActionBlock.

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

Public properties

actionBlock

Added in 1.0.0-alpha06
val actionBlockActionBlock?

The item onClick action buttons defined by ActionBlock.

imageBlock

Added in 1.0.0-alpha06
val imageBlockImageBlock?

The image block for a list item defined by ImageBlock.

textBlock

Added in 1.0.0-alpha06
val textBlockTextBlock

The text block for title, body, and other texts of the item.