IconKt

Added in 1.3.0-alpha03

public final class IconKt


Summary

Public methods

static final @NonNull LayoutElementBuilders.LayoutElement
icon(
    @NonNull MaterialScope receiver,
    @NonNull String protoLayoutResourceId,
    @NonNull DimensionBuilders.ImageDimension size,
    @NonNull ColorBuilders.ColorProp tintColor
)

Returns the icon components with the defined style.

Public methods

public static final @NonNull LayoutElementBuilders.LayoutElement icon(
    @NonNull MaterialScope receiver,
    @NonNull String protoLayoutResourceId,
    @NonNull DimensionBuilders.ImageDimension size,
    @NonNull ColorBuilders.ColorProp tintColor
)

Returns the icon components with the defined style.

Material components provide proper defaults for this icon. In order to take advantage of those, this should be used with the resource ID only: icon("id").

Parameters
@NonNull String protoLayoutResourceId

The protolayout resource id of the icon. Node that, this is not an Android resource id.

@NonNull DimensionBuilders.ImageDimension size

The side of an icon that will be used for width and height.

@NonNull ColorBuilders.ColorProp tintColor

The color used to tint the icon.