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

Constructs the CarIconStyle defined by this builder.

CarIconStyle.Builder

Sets the geometric Shape boundary to crop or frame the icon graphic.

CarIconStyle.Builder

Sets an explicit custom solid CarColor tint for single-color assets.

Public constructors

Builder

Added in 1.9.0-alpha02
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 TINTED or ORIGINAL.

Public functions

build

Added in 1.9.0-alpha02
fun build(): CarIconStyle

Constructs the CarIconStyle defined by this builder.

setShape

Added in 1.9.0-alpha02
@RequiresCarApi(value = 9)
@ExperimentalCarApi
fun setShape(shape: Shape): CarIconStyle.Builder

Sets the geometric Shape boundary to crop or frame the icon graphic.

setTint

Added in 1.9.0-alpha02
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