GridSection.Builder


@ExperimentalCarApi
public final class GridSection.Builder extends Section.BaseBuilder


A builder that constructs GridSection instances.

Summary

Public constructors

Create a new GridSection builder.

Public methods

@NonNull GridSection

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

@NonNull GridSection.Builder

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

@NonNull GridSection.Builder

Sets the size of the items within this section.

Inherited methods

From androidx.car.app.model.Section.BaseBuilder
@NonNull B

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

@NonNull B

Delete all items in this section.

@NonNull B

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

@NonNull B

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

@NonNull B

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

@NonNull B

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

@NonNull B

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

Public constructors

Builder

Added in 1.7.0-beta03
public Builder()

Create a new GridSection builder.

Public methods

build

Added in 1.7.0-beta03
public @NonNull GridSection build()

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

setItemImageShape

Added in 1.7.0-beta03
@CanIgnoreReturnValue
public @NonNull GridSection.Builder setItemImageShape(int itemImageShape)

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

setItemSize

Added in 1.7.0-beta03
@CanIgnoreReturnValue
public @NonNull GridSection.Builder setItemSize(int itemSize)

Sets the size of the items within this section.