CarIconStyle


@CarProtocol
public 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

public final class CarIconStyle.Builder

A builder of CarIconStyle.

Constants

static final @NonNull CarIconStyle

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

static final @NonNull CarIconStyle

Visual styling for icons that should be tinted.

Public methods

boolean
@Nullable Shape

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

@Nullable 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
@NonNull String

Constants

ORIGINAL

Added in 1.9.0-alpha02
public static final @NonNull CarIconStyle ORIGINAL

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
public static final @NonNull CarIconStyle TINTED

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 methods

equals

public boolean equals(@Nullable Object other)

getShape

Added in 1.9.0-alpha02
@RequiresCarApi(value = 9)
@ExperimentalCarApi
public @Nullable Shape getShape()

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

getTint

Added in 1.9.0-alpha02
public @Nullable CarColor getTint()

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

public int hashCode()

toString

public @NonNull String toString()