GridSection


@ExperimentalCarApi
@CarProtocol
public final class GridSection extends Section


A section within the SectionedItemTemplate that contains GridItems - good for showcase large artwork or images for every entry.

Summary

Nested types

A builder that constructs GridSection instances.

Constants

static final int

Renders the image within the grid item in the shape of a circle by cropping it.

static final int

Renders the image within the grid item as-is without modifying its shape - this is the default.

static final int

Renders the items within the section in a large format.

static final int

Renders the items within the section in a medium sized format.

static final int

Renders the items within the section in a small format - this is the default.

Public methods

boolean
int

Returns the shape which this section's grid item images should be rendered to.

int

Returns the size which this section's grid items should be rendered at.

int
@NonNull String

Inherited methods

From androidx.car.app.model.Section
@NonNull ListDelegate<T>

Returns the items added to this section.

@Nullable CarText

Returns the optional message that should appear if there are no items added to this section.

@Nullable CarText

Returns the optional text that should appear with the items in this section.

Constants

ITEM_IMAGE_SHAPE_CIRCLE

Added in 1.7.0-beta02
public static final int ITEM_IMAGE_SHAPE_CIRCLE = 2

Renders the image within the grid item in the shape of a circle by cropping it.

ITEM_IMAGE_SHAPE_UNSET

Added in 1.7.0-beta02
public static final int ITEM_IMAGE_SHAPE_UNSET = 1

Renders the image within the grid item as-is without modifying its shape - this is the default.

ITEM_SIZE_LARGE

Added in 1.7.0-beta02
public static final int ITEM_SIZE_LARGE = 3

Renders the items within the section in a large format.

ITEM_SIZE_MEDIUM

Added in 1.7.0-beta02
public static final int ITEM_SIZE_MEDIUM = 2

Renders the items within the section in a medium sized format.

ITEM_SIZE_SMALL

Added in 1.7.0-beta02
public static final int ITEM_SIZE_SMALL = 1

Renders the items within the section in a small format - this is the default.

Public methods

equals

public boolean equals(@Nullable Object other)

getItemImageShape

Added in 1.7.0-beta02
public int getItemImageShape()

Returns the shape which this section's grid item images should be rendered to.

getItemSize

Added in 1.7.0-beta02
public int getItemSize()

Returns the size which this section's grid items should be rendered at.

hashCode

public int hashCode()

toString

public @NonNull String toString()