GridSection.Builder
@ExperimentalCarApi
public final class GridSection.Builder extends Section.BaseBuilder
| java.lang.Object | ||
| ↳ | androidx.car.app.model.Section.BaseBuilder | |
| ↳ | androidx.car.app.model.GridSection.Builder |
A builder that constructs GridSection instances.
Summary
Public constructors |
|---|
Builder()Create a new |
Public methods |
|
|---|---|
@NonNull GridSection |
build()Creates a new |
@NonNull GridSection.Builder |
@CanIgnoreReturnValueSets how the images of all grid items within this section should be rendered. |
@NonNull GridSection.Builder |
@CanIgnoreReturnValueSets the size of the items within this section. |
Inherited methods |
||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public constructors
Public methods
build
public @NonNull GridSection build()
Creates a new GridSection based off the state of this builder.
setItemImageShape
@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
@CanIgnoreReturnValue
public @NonNull GridSection.Builder setItemSize(int itemSize)
Sets the size of the items within this section.