SectionHeader


@CarProtocol
@ExperimentalCarApi
@RequiresCarApi(value = 9)
public final class SectionHeader


Represents a header for a section within a SectionedItemTemplate.

A section header must include a title. It can also include a start icon, an end icon, and can handle click events.

Summary

Nested types

public final class SectionHeader.Builder

A builder of SectionHeader.

Constants

static final int

Represents a large sized image to be displayed in the section header.

static final int

Represents a small icon to be displayed in the section header.

Public methods

boolean
@Nullable CarIcon

Returns the end icon of the header, or null if none is set.

@Nullable OnClickDelegate

Returns the OnClickDelegate to handle click events on the header, or null if the header is not clickable.

@Nullable CarIcon

Returns the start icon of the header, or null if none is set.

int

Returns the type of the start icon.

@Nullable CarText

Returns the subtitle of the header, or null if none is set.

@NonNull CarText

Returns the title of the header.

int
@NonNull String

Constants

IMAGE_TYPE_LARGE

Added in 1.8.0
public static final int IMAGE_TYPE_LARGE = 2

Represents a large sized image to be displayed in the section header.

IMAGE_TYPE_SMALL

Added in 1.8.0
public static final int IMAGE_TYPE_SMALL = 1

Represents a small icon to be displayed in the section header.

Public methods

equals

public boolean equals(@Nullable Object other)

getEndIcon

Added in 1.8.0
public @Nullable CarIcon getEndIcon()

Returns the end icon of the header, or null if none is set.

See also
setEndIcon

getOnClickDelegate

Added in 1.8.0
public @Nullable OnClickDelegate getOnClickDelegate()

Returns the OnClickDelegate to handle click events on the header, or null if the header is not clickable.

getStartIcon

Added in 1.8.0
public @Nullable CarIcon getStartIcon()

Returns the start icon of the header, or null if none is set.

getStartIconType

Added in 1.8.0
public int getStartIconType()

Returns the type of the start icon.

See also
setStartIcon

getSubtitle

Added in 1.9.0-alpha01
public @Nullable CarText getSubtitle()

Returns the subtitle of the header, or null if none is set.

getTitle

Added in 1.8.0
public @NonNull CarText getTitle()

Returns the title of the header.

hashCode

public int hashCode()

toString

public @NonNull String toString()