GridSection.Builder


@ExperimentalCarApi
class GridSection.Builder : Section.BaseBuilder


A builder that constructs GridSection instances.

Summary

Public constructors

Create a new GridSection builder.

Builder(gridSection: GridSection)

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

Public functions

GridSection

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

GridSection.Builder

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

GridSection.Builder

Sets the size of the items within this section.

Inherited functions

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

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

B

Delete all items in this section.

B

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

B

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

B

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

B

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

B

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

Public constructors

Builder

Added in 1.7.0-beta01
Builder()

Create a new GridSection builder.

Builder

Added in 1.7.0-beta01
Builder(gridSection: GridSection)

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

Public functions

build

Added in 1.7.0-beta01
fun build(): GridSection

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

setItemImageShape

Added in 1.7.0-beta01
@CanIgnoreReturnValue
fun setItemImageShape(itemImageShape: Int): GridSection.Builder

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-beta01
@CanIgnoreReturnValue
fun setItemSize(itemSize: Int): GridSection.Builder

Sets the size of the items within this section.