Section
@CarProtocol
@RequiresCarApi(value = 8)
abstract class Section<T : Item?>
BannerSection |
A section within the |
ChipSection |
A section of |
CondensedSection |
A |
GridSection |
A section within the |
RowSection |
A section within the |
SpotlightSection |
A section within the |
The generic interface for a single section within a sectioned item template. Sections only allow a single type of Item to be added.
Summary
Nested types |
|---|
protected abstract class Section.BaseBuilder<T : Item?, B>Generic |
Protected constructors |
|---|
Section() |
Section(builder: Section.BaseBuilder<T!, *>)Constructor that fills out fields from any section builder. |
Public functions |
|
|---|---|
Boolean |
|
CarText? |
Returns the optional message that should appear if there are no items added to this section. |
OnItemVisibilityChangedDelegate? |
Returns the |
SectionHeader? |
@RequiresCarApi(value = 9)Returns the |
CarText? |
getTitle()Returns the optional text that should appear with the items in this section. |
Int |
hashCode() |
String |
toString() |
Protected constructors
Section
protected Section(builder: Section.BaseBuilder<T!, *>)
Constructor that fills out fields from any section builder.
Public functions
getNoItemsMessage
fun getNoItemsMessage(): CarText?
Returns the optional message that should appear if there are no items added to this section.
getOnItemVisibilityChangedDelegate
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
@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
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.