CarIconStyle.Builder
class CarIconStyle.Builder
A builder of CarIconStyle.
Summary
Public constructors |
|---|
Builder(baseStyle: CarIconStyle)Creates a builder for a custom CarIconStyle based on an existing base style contract. |
Public functions |
|
|---|---|
CarIconStyle |
build()Constructs the |
CarIconStyle.Builder |
@RequiresCarApi(value = 9)Sets the geometric |
CarIconStyle.Builder |
Sets an explicit custom solid |
Public constructors
Builder
Builder(baseStyle: CarIconStyle)
Creates a builder for a custom CarIconStyle based on an existing base style contract.
| Parameters | |
|---|---|
baseStyle: CarIconStyle |
The base style contract to inherit from, typically |
Public functions
build
fun build(): CarIconStyle
Constructs the CarIconStyle defined by this builder.
setShape
@RequiresCarApi(value = 9)
@ExperimentalCarApi
fun setShape(shape: Shape): CarIconStyle.Builder
Sets the geometric Shape boundary to crop or frame the icon graphic.
setTint
fun setTint(tint: CarColor): CarIconStyle.Builder
Sets an explicit custom solid 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