CarIconStyle


@CarProtocol
class CarIconStyle


Defines the visual styling applied to a CarIcon, including tinting behavior and geometric shapes.

In general, icon styling falls into two categories:

  • Tinted: Styled with TINTED, which instructs the host vehicle system to automatically theme-tint the asset with DEFAULT or applies an explicit solid CarColor tint configured via setTint.
  • Original (Not Tinted): Styled with ORIGINAL, which preserves the icon's original colors without allowing host-side tinting (e.g., user avatars, media album art, photos, or un-tinted brand graphics).

Summary

Nested types

A builder of CarIconStyle.

Constants

const CarIconStyle

Visual styling for icons that should retain their original colors without allowing host-side tinting.

const CarIconStyle

Visual styling for icons that should be tinted.

Public functions

Boolean
equals(other: Any?)
Shape?

Returns the Shape defined in this style, or null if none is set.

CarColor?

Returns the explicit CarColor tint defined in this style (such as DEFAULT for auto-tinting or a custom tint), or null if no tint is applied.

Int
String

Constants

ORIGINAL

Added in 1.9.0-alpha02
const val ORIGINALCarIconStyle

Visual styling for icons that should retain their original colors without allowing host-side tinting.

Instructs the host vehicle system to preserve the full original colors of the image without host tinting interference. Use this for assets such as user avatars, media album art, photos, or un-tinted logos.

TINTED

Added in 1.9.0-alpha02
const val TINTEDCarIconStyle

Visual styling for icons that should be tinted.

By default, this instructs the host to automatically tint the icon or allows the dev to provide an explicit custom tint. To apply an explicit custom tint color use Builder with TINTED and call setTint.

Public functions

equals

fun equals(other: Any?): Boolean

getShape

Added in 1.9.0-alpha02
@RequiresCarApi(value = 9)
@ExperimentalCarApi
fun getShape(): Shape?

Returns the Shape defined in this style, or null if none is set.

getTint

Added in 1.9.0-alpha02
fun getTint(): CarColor?

Returns the explicit CarColor tint defined in this style (such as DEFAULT for auto-tinting or a custom tint), or null if no tint is applied.

hashCode

fun hashCode(): Int

toString

fun toString(): String