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 ListTemplate.
Summary
Nested types |
|---|
class ItemList.BuilderA builder of |
interface ItemList.OnItemVisibilityChangedListenerA listener for handling item visibility changes. |
interface ItemList.OnSelectedListenerA listener for handling selection events for lists with selectable items. |
Public functions |
|
|---|---|
Boolean |
|
(Mutable)List<Item!> |
getItems()Returns the list of items in this |
CarText? |
Returns the app-supplied text to be displayed if the list is empty or |
OnItemVisibilityChangedDelegate? |
Returns the |
OnSelectedDelegate? |
Returns the |
Int |
Returns the index of the selected item of the list. |
Int |
hashCode() |
ItemList.Builder |
Creates and returns a new |
String |
toString() |
Public functions
getItems
fun getItems(): (Mutable)List<Item!>
Returns the list of items in this ItemList.
| See also | |
|---|---|
addItem |
getNoItemsMessage
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.
| See also | |
|---|---|
setNoItemsMessage |
getOnItemVisibilityChangedDelegate
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.
| See also | |
|---|---|
setOnItemsVisibilityChangedListener |
getOnSelectedDelegate
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.
| See also | |
|---|---|
setOnSelectedListener |
getSelectedIndex
fun getSelectedIndex(): Int
Returns the index of the selected item of the list.
| See also | |
|---|---|
setSelectedIndex |
toBuilder
fun toBuilder(): ItemList.Builder
Creates and returns a new Builder initialized with this ItemList's data.