Chip
@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 |
|---|
class Chip.BuilderA builder of |
Public functions |
|
|---|---|
Boolean |
|
CarIcon? |
Returns the end icon of the chip, or |
OnClickDelegate? |
Returns the |
CarIcon? |
Returns the start icon of the chip, or |
ChipStyle? |
getStyle()Returns the style of the chip, or |
CarText? |
getTitle()Returns the title of the chip, or |
Int |
hashCode() |
Boolean |
Returns whether the chip is selected. |
String |
toString() |
Public functions
getEndIcon
fun getEndIcon(): CarIcon?
Returns the end icon of the chip, or null if not set.
getOnClickDelegate
fun getOnClickDelegate(): OnClickDelegate?
Returns the OnClickDelegate to be called when the chip is clicked.
getStartIcon
fun getStartIcon(): CarIcon?
Returns the start icon of the chip, or null if not set.