Section
@CarProtocol
@ExperimentalCarApi
public abstract class Section<T extends Item>
GridSection |
A section within the |
RowSection |
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 extends Item, B>Generic |
Protected constructors |
|---|
Section() |
Section(@NonNull Section.BaseBuilder<T, Object> builder)Constructor that fills out fields from any section builder. |
Public methods |
|
|---|---|
boolean |
|
@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 OnItemVisibilityChangedDelegate |
Returns the |
@Nullable CarText |
getTitle()Returns the optional text that should appear with the items in this section. |
int |
hashCode() |
@NonNull String |
toString() |
Protected constructors
Section
protected Section(@NonNull Section.BaseBuilder<T, Object> builder)
Constructor that fills out fields from any section builder.
Public methods
getItemsDelegate
public @NonNull ListDelegate<T> getItemsDelegate()
Returns the items added to this section.
getNoItemsMessage
public @Nullable CarText getNoItemsMessage()
Returns the optional message that should appear if there are no items added to this section.
getOnItemVisibilityChangedDelegate
public @Nullable OnItemVisibilityChangedDelegate getOnItemVisibilityChangedDelegate()
Returns the OnItemVisibilityChangedDelegate to be called when the visible items in this Section changes, or null if one isn't set.