public final class

GridSection.Builder

extends Section.BaseBuilder<GridItem, GridSection.Builder>

 java.lang.Object

androidx.car.app.model.Section.BaseBuilder<GridItem, GridSection.Builder>

↳androidx.car.app.model.GridSection.Builder

Overview

A builder that constructs GridSection instances.

Summary

Constructors
publicBuilder()

Create a new GridSection builder.

publicBuilder(GridSection gridSection)

Create a new GridSection builder, copying values from an existing instance.

Methods
public GridSectionbuild()

Creates a new GridSection based off the state of this builder.

public GridSection.BuildersetItemImageShape(int itemImageShape)

Sets how the images of all grid items within this section should be rendered.

public GridSection.BuildersetItemSize(int itemSize)

Sets the size of the items within this section.

from Section.BaseBuilder<T, B>addItem, clearItems, setItems, setNoItemsMessage, setNoItemsMessage, setTitle, setTitle
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Create a new GridSection builder.

public Builder(GridSection gridSection)

Create a new GridSection builder, copying values from an existing instance.

Methods

public GridSection.Builder setItemSize(int itemSize)

Sets the size of the items within this section.

public GridSection.Builder setItemImageShape(int itemImageShape)

Sets how the images of all grid items within this section should be rendered. Uses GridSection.ITEM_IMAGE_SHAPE_UNSET by default.

public GridSection build()

Creates a new GridSection based off the state of this builder.