ItemList


@CarProtocol
class ItemList


Represents a list of Item instances. ItemList instances are used by templates that contain lists of models, such as for example, the list of Rows in a .

Summary

Nested types

A builder of ItemList.

A listener for handling item visibility changes.

A listener for handling selection events for lists with selectable items.

Public functions

Boolean
equals(other: Any?)
(Mutable)List<Item!>

Returns the list of items in this ItemList.

CarText?

Returns the app-supplied text to be displayed if the list is empty or null if the default text will be used by the host.

OnItemVisibilityChangedDelegate?

Returns the OnItemVisibilityChangedDelegate to be called when the visible items in the list changes or null if one hasn't been set.

OnSelectedDelegate?

Returns the OnSelectedDelegate to be called when when an item is selected by the user or null is the list is non-selectable.

Int

Returns the index of the selected item of the list.

Int
ItemList.Builder

Creates and returns a new Builder initialized with this ItemList's data.

String

Public functions

equals

fun equals(other: Any?): Boolean

getItems

Added in 1.0.0
fun getItems(): (Mutable)List<Item!>

Returns the list of items in this ItemList.

See also
addItem

getNoItemsMessage

Added in 1.0.0
fun getNoItemsMessage(): CarText?

Returns the app-supplied text to be displayed if the list is empty or null if the default text will be used by the host.

getOnItemVisibilityChangedDelegate

Added in 1.0.0
fun getOnItemVisibilityChangedDelegate(): OnItemVisibilityChangedDelegate?

Returns the OnItemVisibilityChangedDelegate to be called when the visible items in the list changes or null if one hasn't been set.

getOnSelectedDelegate

Added in 1.0.0
fun getOnSelectedDelegate(): OnSelectedDelegate?

Returns the OnSelectedDelegate to be called when when an item is selected by the user or null is the list is non-selectable.

getSelectedIndex

Added in 1.0.0
fun getSelectedIndex(): Int

Returns the index of the selected item of the list.

See also
setSelectedIndex

hashCode

fun hashCode(): Int

toBuilder

Added in 1.3.0
@ExperimentalCarApi
fun toBuilder(): ItemList.Builder

Creates and returns a new Builder initialized with this ItemList's data.

toString

fun toString(): String