ChipStyle


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


Defines the visual style of a Chip.

This style can be used to customize the appearance of the chip, such as its background and content colors.

This style can be set on both the ChipSection to apply to all chips, and/or individually to a single Chip. A common usage pattern is to set a default style on the Section, then override the style of the individual "selected" Chips. Remember that these colors will fall back to host defaults if they are unset or they fail contrast checks.

Summary

Nested types

public final class ChipStyle.Builder

A builder of ChipStyle.

Public methods

boolean
@Nullable CarColor

Returns the background color of the chip, or null if not set.

@Nullable CarColor

Returns the content color of the chip, or null if not set.

@Nullable CarColor

Returns the stroke color of the chip, or null if not set.

int
@NonNull String

Public methods

equals

public boolean equals(@Nullable Object other)

getBackgroundColor

Added in 1.8.0-beta01
public @Nullable CarColor getBackgroundColor()

Returns the background color of the chip, or null if not set.

getContentColor

Added in 1.8.0-beta01
public @Nullable CarColor getContentColor()

Returns the content color of the chip, or null if not set.

getOutlineColor

Added in 1.8.0-beta01
public @Nullable CarColor getOutlineColor()

Returns the stroke color of the chip, or null if not set.

hashCode

public int hashCode()

toString

public @NonNull String toString()