CarIcon.Builder
public
static
class
CarIcon.Builder
extends Object
java.lang.Object | |
↳ | com.google.android.libraries.car.app.model.CarIcon.Builder |
A builder of CarIcon
.
Summary
Public methods | |
---|---|
CarIcon
|
build()
Constructs the |
CarIcon.Builder
|
setIcon(CarIcon carIcon)
Configures the builder with the same icon and tint as the given |
CarIcon.Builder
|
setTint(CarColor tint)
Sets the tint of the icon to the given |
Inherited methods | |
---|---|
Public methods
setIcon
public CarIcon.Builder setIcon (CarIcon carIcon)
Configures the builder with the same icon and tint as the given CarIcon
.
Parameters | |
---|---|
carIcon |
CarIcon |
Returns | |
---|---|
CarIcon.Builder |
Throws | |
---|---|
NullPointerException |
if carIcon is null .
|
setTint
public CarIcon.Builder setTint (CarColor tint)
Sets the tint of the icon to the given CarColor
.
This tint overrides the tint set through IconCompat.setTint(int)
in the backing
IconCompat
with a CarColor
tint.The tint set through IconCompat.setTint(int)
is not guaranteed to be applied if the CarIcon
tint is not
set.
The tint mode used to blend this color is PorterDuff.Mode.SRC_IN
.
If set to null
, then no tint will be applied to the icon.
By default, no tint is set unless one is specified with this method.
Parameters | |
---|---|
tint |
CarColor |
Returns | |
---|---|
CarIcon.Builder |
See also: