@ExperimentalCarApi
@CarProtocol
@RequiresCarApi(value = 9)
class Chip : Item


A Chip is a toggle-like button with text and/or leading/trailing icon(s).

Chips can, for example, be used to filter items in a SectionedItemTemplate when clicked on. A chip's style, content, and selected state can be changed in response to a user click.

Summary

Nested types

A builder of Chip.

Public functions

Boolean
equals(other: Any?)
CarIcon?

Returns the end icon of the chip, or null if not set.

OnClickDelegate?

Returns the OnClickDelegate to be called when the chip is clicked.

CarIcon?

Returns the start icon of the chip, or null if not set.

ChipStyle?

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

CarText?

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

Int
Boolean

Returns whether the chip is selected.

String

Public functions

equals

fun equals(other: Any?): Boolean

getEndIcon

Added in 1.8.0-beta01
fun getEndIcon(): CarIcon?

Returns the end icon of the chip, or null if not set.

getOnClickDelegate

Added in 1.8.0-beta01
fun getOnClickDelegate(): OnClickDelegate?

Returns the OnClickDelegate to be called when the chip is clicked.

getStartIcon

Added in 1.8.0-beta01
fun getStartIcon(): CarIcon?

Returns the start icon of the chip, or null if not set.

getStyle

Added in 1.8.0-beta01
fun getStyle(): ChipStyle?

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

getTitle

Added in 1.8.0-beta01
fun getTitle(): CarText?

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

hashCode

fun hashCode(): Int

isSelected

Added in 1.8.0-beta01
fun isSelected(): Boolean

Returns whether the chip is selected.

toString

fun toString(): String