Google is committed to advancing racial equity for Black communities. See how.

ListTemplate

public final class ListTemplate
extends Object implements Template

java.lang.Object
   ↳ com.google.android.libraries.car.app.model.ListTemplate


A template representing a list of items.

Template Restrictions

In regards to template refreshes, as described in Screen.getTemplate(), this template is considered a refresh of a previous one if:
  • The template title has not changed, and
  • The previous template is in a loading state (see ListTemplate.Builder.setIsLoading(boolean), or 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 string contents (title, texts, not counting spans) of each row must not have changed.
  • For rows that contain a Toggle, updates to the title or texts are also allowed if the toggle state has changed between the previous and new templates.

Summary

Nested classes

class ListTemplate.Builder

A builder of ListTemplate

Public methods

static ListTemplate.Builder builder()

Constructs a new builder of ListTemplate.

boolean equals(Object other)
int hashCode()
String toString()

Inherited methods

Public methods

builder

public static ListTemplate.Builder builder ()

Constructs a new builder of ListTemplate.

Returns
ListTemplate.Builder

equals

public boolean equals (Object other)

Parameters
other Object

Returns
boolean

hashCode

public int hashCode ()

Returns
int

toString

public String toString ()

Returns
String