CondensedItem


@RequiresCarApi(value = 9)
@ExperimentalCarApi
@CarProtocol
public final class CondensedItem implements Item


A main UI component representing an item in a condensed format.

Summary

Nested types

A builder for CondensedItem.

Constants

static final int

Represents an icon to be displayed in the condensed item.

static final int

Represents a large image.

static final int

Represents a small image.

Public methods

boolean
@Nullable CarIcon

Returns the leading image of the item, or null if not set.

int

Returns the type of the leading image.

@Nullable OnClickDelegate

Returns the OnClickDelegate for the item, or null if not set.

@Nullable CarProgressBar

Returns the CarProgressBar for the item, or null if not set.

@Nullable CondensedItemStyle

Returns the style of the item, or null if not set.

@Nullable CarText

Returns the text of the item, or null if not set.

@Nullable CarText

Returns the title of the item, or null if not set.

@Nullable CarIcon

Returns the trailing image of the item, or null if not set.

int

Returns the type of the trailing image.

int
boolean

Returns whether the item can be included in indexed lists.

@NonNull String

Constants

IMAGE_TYPE_ICON

Added in 1.8.0
public static final int IMAGE_TYPE_ICON = 1

Represents an icon to be displayed in the condensed item.

A tint color is expected to be provided via setTint. Otherwise, a default tint color as determined by the host will be applied.

IMAGE_TYPE_LARGE

Added in 1.8.0
public static final int IMAGE_TYPE_LARGE = 3

Represents a large image. The host renders it edge-to-edge, scaling the image to fill and potentially crop within the bounds.

IMAGE_TYPE_SMALL

Added in 1.8.0
public static final int IMAGE_TYPE_SMALL = 2

Represents a small image. The host renders it with standard padding and scales the image to fit within the bounds.

Public methods

equals

public boolean equals(@Nullable Object other)

getLeadingImage

Added in 1.8.0
public @Nullable CarIcon getLeadingImage()

Returns the leading image of the item, or null if not set.

getLeadingImageType

Added in 1.8.0
public int getLeadingImageType()

Returns the type of the leading image.

getOnClickDelegate

Added in 1.8.0
public @Nullable OnClickDelegate getOnClickDelegate()

Returns the OnClickDelegate for the item, or null if not set.

getProgressBar

Added in 1.8.0
public @Nullable CarProgressBar getProgressBar()

Returns the CarProgressBar for the item, or null if not set.

getStyle

Added in 1.8.0
public @Nullable CondensedItemStyle getStyle()

Returns the style of the item, or null if not set.

getText

Added in 1.8.0
public @Nullable CarText getText()

Returns the text of the item, or null if not set.

getTitle

Added in 1.8.0
public @Nullable CarText getTitle()

Returns the title of the item, or null if not set.

getTrailingImage

Added in 1.8.0
public @Nullable CarIcon getTrailingImage()

Returns the trailing image of the item, or null if not set.

getTrailingImageType

Added in 1.8.0
public int getTrailingImageType()

Returns the type of the trailing image.

hashCode

public int hashCode()

isIndexable

Added in 1.9.0-alpha01
public boolean isIndexable()

Returns whether the item can be included in indexed lists.

See also
setIndexable

toString

public @NonNull String toString()