Row.Builder

public static final class Row.Builder
extends Object

java.lang.Object
   ↳ androidx.car.app.model.Row.Builder


A builder of Row.

Summary

Public constructors

Builder()

Returns an empty Row.Builder instance.

Public methods

Row.Builder addText(CarText text)

Adds a text string to the row below the title, with support for multiple length variants.

Row.Builder addText(CharSequence text)

Adds a text string to the row below the title.

Row build()

Constructs the Row defined by this builder.

Row.Builder setBrowsable(boolean isBrowsable)

Shows an icon at the end of the row that indicates that the row is browsable.

Row.Builder setImage(CarIcon image, int imageType)

Sets an image to show in the row with the given image type.

Row.Builder setImage(CarIcon image)

Sets an image to show in the row with the default size Row.IMAGE_TYPE_SMALL.

Row.Builder setMetadata(Metadata metadata)

Sets the Metadata associated with the row.

Row.Builder setOnClickListener(OnClickListener onClickListener)

Sets the OnClickListener to be called back when the row is clicked.

Row.Builder setTitle(CharSequence title)

Sets the title of the row.

Row.Builder setTitle(CarText title)

Sets the title of the row, with support for multiple length variants.

Row.Builder setToggle(Toggle toggle)

Sets a Toggle to show in the row.

Inherited methods