ItemList
public
final
class
ItemList
extends Object
java.lang.Object | |
↳ | androidx.car.app.model.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 Row
s in a ListTemplate
.
Summary
Nested classes | |
---|---|
class |
ItemList.Builder
A builder of |
interface |
ItemList.OnItemVisibilityChangedListener
A listener for handling item visibility changes. |
interface |
ItemList.OnSelectedListener
A listener for handling selection events for lists with selectable items. |
Public methods | |
---|---|
boolean
|
equals(Object other)
|
List<Item>
|
getItems()
Returns the list of items in this |
CarText
|
getNoItemsMessage()
Returns the app-supplied text to be displayed if the list is empty or |
OnItemVisibilityChangedDelegate
|
getOnItemVisibilityChangedDelegate()
Returns the |
OnSelectedDelegate
|
getOnSelectedDelegate()
Returns the |
int
|
getSelectedIndex()
Returns the index of the selected item of the list. |
int
|
hashCode()
|
String
|
toString()
|
Inherited methods | |
---|---|
Public methods
equals
public boolean equals (Object other)
Parameters | |
---|---|
other |
Object |
Returns | |
---|---|
boolean |
getItems
public List<Item> getItems ()
Returns the list of items in this ItemList
.
Returns | |
---|---|
List<Item> |
See also:
getNoItemsMessage
public CarText getNoItemsMessage ()
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.
Returns | |
---|---|
CarText |
getOnItemVisibilityChangedDelegate
public OnItemVisibilityChangedDelegate getOnItemVisibilityChangedDelegate ()
Returns the OnItemVisibilityChangedDelegate
to be called when the visible
items in the list changes or null
if one hasn't been set.
Returns | |
---|---|
OnItemVisibilityChangedDelegate |
getOnSelectedDelegate
public OnSelectedDelegate getOnSelectedDelegate ()
Returns the OnSelectedDelegate
to be called when when an item is selected
by the user or null
is the list is non-selectable.
Returns | |
---|---|
OnSelectedDelegate |
getSelectedIndex
public int getSelectedIndex ()
Returns the index of the selected item of the list.
Returns | |
---|---|
int |
See also:
hashCode
public int hashCode ()
Returns | |
---|---|
int |
toString
public String toString ()
Returns | |
---|---|
String |
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-02-24 UTC.