LayoutElementBuilders.ColorFilter.Builder


class LayoutElementBuilders.ColorFilter.Builder


Builder for ColorFilter

Summary

Public constructors

Creates an instance of Builder.

Public functions

LayoutElementBuilders.ColorFilter

Builds an instance from accumulated values.

LayoutElementBuilders.ColorFilter.Builder
@RequiresSchemaVersion(major = 1, minor = 0)
setTint(tint: ColorBuilders.ColorProp)

Sets the tint color to use.

Public constructors

Builder

Added in 1.0.0
Builder()

Creates an instance of Builder.

Public functions

build

Added in 1.0.0
fun build(): LayoutElementBuilders.ColorFilter

Builds an instance from accumulated values.

setTint

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setTint(tint: ColorBuilders.ColorProp): LayoutElementBuilders.ColorFilter.Builder

Sets the tint color to use. If specified, the image will be tinted, using SRC_IN blending (that is, all color information will be stripped from the target image, and only the alpha channel will be blended with the requested color).

Note that only Android image resources can be tinted; Inline images will not be tinted, and this property will have no effect.

While this field is statically accessible from 1.0, it's only bindable since version 1.2 and renderers supporting version 1.2 will use the dynamic value (if set).