ListTemplateData

class ListTemplateData


The semantic data required to build List Template layouts.

The data has a header for general information and a list of items defined by ListTemplateItem. The header can have a header icon followed by header text and optionally an action button. No header would be shown if all header data are omitted.

The data is independent of the layout presentation layer by each platform. For example, Glance AppWidget can put an action button in the header while Glance Tile might layout the button without a header. Only the level of data details can be indicated for use in the list style.

Summary

Public constructors

ListTemplateData(
    headerBlock: HeaderBlock?,
    listContent: List<ListTemplateItem>,
    listStyle: ListStyle
)

Public functions

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

Public properties

HeaderBlock?

The header of the template by HeaderBlock.

List<ListTemplateItem>

List of items by ListTemplateItem.

ListStyle

The level of data details by ListStyle.

Public constructors

ListTemplateData

ListTemplateData(
    headerBlock: HeaderBlock? = null,
    listContent: List<ListTemplateItem> = listOf(),
    listStyle: ListStyle = ListStyle.Full
)
Parameters
headerBlock: HeaderBlock? = null

The header of the template by HeaderBlock.

listContent: List<ListTemplateItem> = listOf()

List of items by ListTemplateItem. Default to empty list.

listStyle: ListStyle = ListStyle.Full

The level of data details by ListStyle. Default to the ListStyle.Full level.

Public functions

equals

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

hashCode

open fun hashCode(): Int

Public properties

headerBlock

Added in 1.0.0-alpha06
val headerBlockHeaderBlock?

The header of the template by HeaderBlock.

listContent

Added in 1.0.0-alpha06
val listContentList<ListTemplateItem>

List of items by ListTemplateItem. Default to empty list.

listStyle

Added in 1.0.0-alpha06
val listStyleListStyle

The level of data details by ListStyle. Default to the ListStyle.Full level.