# CarIconStyle.Builder

Artifact: [androidx.car.app:app](https://developer.android.com/jetpack/androidx/releases/car-app) [View Source](https://cs.android.com/search?q=file:androidx/car/app/model/CarIconStyle.java+class:androidx.car.app.model.CarIconStyle.Builder) Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

*** ** * ** ***


```
class CarIconStyle.Builder
```

<br />

*** ** * ** ***

A builder of `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIconStyle`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIconStyle.Builder#Builder(androidx.car.app.model.CarIconStyle)(baseStyle: https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIconStyle)` Creates a builder for a custom CarIconStyle based on an existing base style contract. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIconStyle` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIconStyle.Builder#build()()` Constructs the `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIconStyle` defined by this builder. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIconStyle.Builder` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 9) @https://developer.android.com/reference/kotlin/androidx/car/app/annotations/ExperimentalCarApi https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIconStyle.Builder#setShape(androidx.car.app.model.Shape)(shape: https://developer.android.com/reference/kotlin/androidx/car/app/model/Shape)` Sets the geometric `https://developer.android.com/reference/kotlin/androidx/car/app/model/Shape` boundary to crop or frame the icon graphic. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIconStyle.Builder` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIconStyle.Builder#setTint(androidx.car.app.model.CarColor)(tint: https://developer.android.com/reference/kotlin/androidx/car/app/model/CarColor)` Sets an explicit custom solid `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarColor` tint for single-color assets. |

## Public constructors

### Builder

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
Builder(baseStyle: CarIconStyle)
```

Creates a builder for a custom CarIconStyle based on an existing base style contract.

| Parameters |
|---|---|
| `baseStyle: https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIconStyle` | The base style contract to inherit from, typically `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIconStyle#TINTED()` or `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIconStyle#ORIGINAL()`. |

## Public functions

### build

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
fun build(): CarIconStyle
```

Constructs the `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarIconStyle` defined by this builder.

### setShape

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
@RequiresCarApi(value = 9)
@ExperimentalCarApi
fun setShape(shape: Shape): CarIconStyle.Builder
```

Sets the geometric `https://developer.android.com/reference/kotlin/androidx/car/app/model/Shape` boundary to crop or frame the icon graphic.

### setTint

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
fun setTint(tint: CarColor): CarIconStyle.Builder
```

Sets an explicit custom solid `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarColor` tint for single-color assets.

This will apply a solid color tint rather than leaving the image as-is. Use `
CarIconStyle.Builder(CarIconStyle.ORIGINAL)`\` to create an un-tinted style