Section


@CarProtocol
@ExperimentalCarApi
public abstract class Section<T extends Item>

Known direct subclasses
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.


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 extends Item>

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

Summary

Nested types

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

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

Protected constructors

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 CarText

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

int
@NonNull String

Protected constructors

Section

Added in 1.7.0-beta02
protected Section()

Section

Added in 1.7.0-beta02
protected Section(@NonNull Section.BaseBuilder<T, Object> builder)

Constructor that fills out fields from any section builder.

Public methods

equals

public boolean equals(@Nullable Object other)

getItemsDelegate

Added in 1.7.0-beta02
public @NonNull ListDelegate<T> getItemsDelegate()

Returns the items added to this section.

getNoItemsMessage

Added in 1.7.0-beta02
public @Nullable CarText getNoItemsMessage()

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

getTitle

Added in 1.7.0-beta02
public @Nullable CarText getTitle()

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

hashCode

public int hashCode()

toString

public @NonNull String toString()