Section


@CarProtocol
@RequiresCarApi(value = 8)
abstract class Section<T : Item?>

Known direct subclasses
BannerSection

A section within the SectionedItemTemplate that contains a Banner.

ChipSection

A section of Chips.

CondensedSection

A Section within the SectionedItemTemplate that contains CondensedItems.

GridSection

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

RowSection

A section within the SectionedItemTemplate that contains Rows - good for showcasing small icons and longer text for every entry.

SpotlightSection

A section within the SectionedItemTemplate that contains a single image and multiple CondensedItems.


The generic interface for a single section within a sectioned item template. Sections only allow a single type of Item to be added.

Parameters
<T : Item?>

the type of Item that's allowed to be added to this section

Summary

Nested types

protected abstract class Section.BaseBuilder<T : Item?, B>

Generic Section builder that contains the fields that all sections share.

Protected constructors

Section(builder: Section.BaseBuilder<T!, Any!>)

Constructor that fills out fields from any section builder.

Public functions

Boolean
equals(other: Any?)
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.

Int
String

Protected constructors

Section

Added in 1.7.0
protected Section()

Section

Added in 1.7.0
protected Section(builder: Section.BaseBuilder<T!, Any!>)

Constructor that fills out fields from any section builder.

Public functions

equals

fun equals(other: Any?): Boolean

getNoItemsMessage

Added in 1.7.0
fun getNoItemsMessage(): CarText?

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

getOnItemVisibilityChangedDelegate

Added in 1.8.0
fun getOnItemVisibilityChangedDelegate(): OnItemVisibilityChangedDelegate?

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

getSectionHeader

Added in 1.8.0
@RequiresCarApi(value = 9)
@ExperimentalCarApi
fun getSectionHeader(): SectionHeader?

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

If this is set, it takes precedence over getTitle.

getTitle

Added in 1.7.0
fun getTitle(): CarText?

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

If getSectionHeader is set, it takes precedence and this title should be ignored.

hashCode

fun hashCode(): Int

toString

fun toString(): String