Enum CarColor
- All Implemented Interfaces:
Comparable<CarColor>
A small, head-unit-safe colour palette for
CarAction backgrounds and accents. In-car UIs do not
allow arbitrary ARGB colours (the system tints for legibility and theme/contrast compliance), so
the API exposes named roles that each platform maps to its own car colour
(androidx.car.app.model.CarColor / the CarPlay system tint).-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA blue role.The head unit's default colour for the element.A green role, typically for confirm/go actions.The app's primary/accent colour as resolved by the head unit theme.A red role, typically for destructive or stop/cancel actions.A yellow/amber role, typically for cautionary actions. -
Method Summary
Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
DEFAULT
The head unit's default colour for the element. -
PRIMARY
The app's primary/accent colour as resolved by the head unit theme. -
RED
A red role, typically for destructive or stop/cancel actions. -
GREEN
A green role, typically for confirm/go actions. -
BLUE
A blue role. -
YELLOW
A yellow/amber role, typically for cautionary actions.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-