protected abstract class

Section.BaseBuilder<T extends Item, B>

extends java.lang.Object

 java.lang.Object

↳androidx.car.app.model.Section.BaseBuilder<T, B>

Subclasses:

RowSection.Builder, GridSection.Builder

Overview

Generic Section builder that contains the fields that all sections share.

Summary

Constructors
protectedBaseBuilder()

protectedBaseBuilder(Section<Item> section)

Methods
public java.lang.ObjectaddItem(Item item)

Adds an item to this section, appending to the existing list of items.

public java.lang.ObjectclearItems()

Delete all items in this section.

public java.lang.ObjectsetItems(java.util.List<Item> items)

Sets the items for this section, overwriting any other previously set items.

public java.lang.ObjectsetNoItemsMessage(CarText noItemsMessage)

Sets or clears the optional message to display in this section when there are 0 items added to it.

public java.lang.ObjectsetNoItemsMessage(java.lang.CharSequence noItemsMessage)

Sets or clears the optional message to display in this section when there are 0 items added to it.

public java.lang.ObjectsetTitle(CarText title)

Sets or clears the optional title that appears above the items in this section.

public java.lang.ObjectsetTitle(java.lang.CharSequence title)

Sets or clears the optional title that appears above the items in this section.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

protected BaseBuilder()

protected BaseBuilder(Section<Item> section)

Methods

public java.lang.Object setItems(java.util.List<Item> items)

Sets the items for this section, overwriting any other previously set items.

public java.lang.Object addItem(Item item)

Adds an item to this section, appending to the existing list of items.

public java.lang.Object clearItems()

Delete all items in this section.

public java.lang.Object setTitle(java.lang.CharSequence title)

Sets or clears the optional title that appears above the items in this section. If not set, no title shows up. The title must conform to CarTextConstraints.TEXT_ONLY constraints.

public java.lang.Object setTitle(CarText title)

Sets or clears the optional title that appears above the items in this section. If not set, no title shows up. The title must conform to CarTextConstraints.TEXT_ONLY constraints.

public java.lang.Object setNoItemsMessage(java.lang.CharSequence noItemsMessage)

Sets or clears the optional message to display in this section when there are 0 items added to it. If not set, this section will not show any message when there are 0 items. The message must conform to CarTextConstraints.TEXT_ONLY constraints.

public java.lang.Object setNoItemsMessage(CarText noItemsMessage)

Sets or clears the optional message to display in this section when there are 0 items added to it. If not set, this section will not show any message when there are 0 items. The message must conform to CarTextConstraints.TEXT_ONLY constraints.