ListTemplate


@CarProtocol
class ListTemplate : Template


A template representing a list of items.

Template Restrictions In regards to template refreshes, as described in onGetTemplate, this template is considered a refresh of a previous one if:
  • The previous template is in a loading state (see setLoading}, or
  • The template title has not changed, and the ItemList structure between the templates have not changed. This means that if the previous template has multiple ItemList sections, the new template must have the same number of sections with the same headers. Further, the number of rows and the title (not counting spans) of each row must not have changed.
  • For rows that contain a Toggle, updates to the title are also allowed if the toggle state has changed between the previous and new templates.

Summary

Nested types

A builder of ListTemplate.

Public functions

Boolean
equals(other: Any?)
ActionStrip?

This function is deprecated.

use getEndHeaderActions instead.

(Mutable)List<Action!>
@RequiresCarApi(value = 6)
getActions()

Returns the list of additional actions.

Header?

Returns the Header to display in this template.

Action?

This function is deprecated.

use getStartHeaderAction instead.

(Mutable)List<SectionedItemList!>

Returns the list of SectionedItemList instances to be displayed in the template.

ItemList?

Returns the ItemList instance containing the list of items to display or null if one hasn't been set.

CarText?

This function is deprecated.

use getTitle instead.

Int
Boolean

Returns whether the template is loading.

ListTemplate.Builder

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

String

Public functions

equals

fun equals(other: Any?): Boolean

getActionStrip

Added in 1.0.0
Deprecated in 1.7.0-beta03
fun getActionStrip(): ActionStrip?

Returns the ActionStrip for this template or null if not set.

See also
setActionStrip

getActions

Added in 1.4.0
@RequiresCarApi(value = 6)
fun getActions(): (Mutable)List<Action!>

Returns the list of additional actions.

See also
addAction

getHeader

Added in 1.7.0-beta03
fun getHeader(): Header?

Returns the Header to display in this template.

This method was introduced in API 7, but is backwards compatible even if the client is using API 6 or below.

See also
setHeader

getHeaderAction

Added in 1.0.0
Deprecated in 1.7.0-beta03
fun getHeaderAction(): Action?

Returns the Action that is set to be displayed in the header of the template, or null if not set.

See also
setHeaderAction

getSectionedLists

Added in 1.0.0
fun getSectionedLists(): (Mutable)List<SectionedItemList!>

Returns the list of SectionedItemList instances to be displayed in the template.

See also
addSectionedList

getSingleList

Added in 1.0.0
fun getSingleList(): ItemList?

Returns the ItemList instance containing the list of items to display or null if one hasn't been set.

See also
setSingleList

getTitle

Added in 1.0.0
Deprecated in 1.7.0-beta03
fun getTitle(): CarText?

Returns the title of the template or null if not set.

See also
setTitle

hashCode

fun hashCode(): Int

isLoading

Added in 1.0.0
fun isLoading(): Boolean

Returns whether the template is loading.

See also
setLoading

toBuilder

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

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

toString

fun toString(): String