GridSection


@CarProtocol
@RequiresCarApi(value = 8)
class GridSection : 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

const Int

The last row will be shown as-is.

const Int

Truncates the last row if that row is not completely filled

const Int

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

const Int

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

const Int

Renders the items within the section in an extra large sized format.

const Int

Renders the items within the section in a large format.

const Int

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

const Int

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

Public functions

Boolean
equals(other: Any?)
Int

Returns the strategy for handling incomplete last row

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
String

Inherited functions

From androidx.car.app.model.Section
CarText?

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

OnItemVisibilityChangedDelegate?

Returns the OnItemVisibilityChangedDelegate to be called when the visible items in this Section changes, or null if one isn't set.

SectionHeader?

Returns the SectionHeader for this section, or null if not set.

CarText?

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

Constants

INCOMPLETE_LAST_ROW_AS_IS

Added in 1.9.0-alpha02
const val INCOMPLETE_LAST_ROW_AS_IS = 0: Int

The last row will be shown as-is. This is a default behavior

INCOMPLETE_LAST_ROW_TRUNCATE

Added in 1.9.0-alpha02
const val INCOMPLETE_LAST_ROW_TRUNCATE = 1: Int

Truncates the last row if that row is not completely filled

ITEM_IMAGE_SHAPE_CIRCLE

Added in 1.7.0
const val ITEM_IMAGE_SHAPE_CIRCLE = 2: Int

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
const val ITEM_IMAGE_SHAPE_UNSET = 1: Int

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

ITEM_SIZE_EXTRA_LARGE

Added in 1.8.0
const val ITEM_SIZE_EXTRA_LARGE = 4: Int

Renders the items within the section in an extra large sized format.

ITEM_SIZE_LARGE

Added in 1.7.0
const val ITEM_SIZE_LARGE = 3: Int

Renders the items within the section in a large format.

ITEM_SIZE_MEDIUM

Added in 1.7.0
const val ITEM_SIZE_MEDIUM = 2: Int

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

ITEM_SIZE_SMALL

Added in 1.7.0
const val ITEM_SIZE_SMALL = 1: Int

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

Public functions

equals

fun equals(other: Any?): Boolean

getIncompleteLastRowStrategy

Added in 1.9.0-alpha02
@RequiresCarApi(value = 9)
@ExperimentalCarApi
fun getIncompleteLastRowStrategy(): Int

Returns the strategy for handling incomplete last row

getItemImageShape

Added in 1.7.0
fun getItemImageShape(): Int

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

getItemSize

Added in 1.7.0
fun getItemSize(): Int

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

hashCode

fun hashCode(): Int

toString

fun toString(): String