IconKt

Added in 1.3.0-alpha08

public final class IconKt


Summary

Public methods

static final @NonNull LayoutElementBuilders.LayoutElement
icon(
    @NonNull MaterialScope receiver,
    @NonNull String protoLayoutResourceId,
    @NonNull DimensionBuilders.ImageDimension width,
    @NonNull DimensionBuilders.ImageDimension height,
    @NonNull LayoutColor 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 width,
    @NonNull DimensionBuilders.ImageDimension height,
    @NonNull LayoutColor 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 width

The width of the icon.

@NonNull DimensionBuilders.ImageDimension height

The height of the icon.

@NonNull LayoutColor tintColor

The color used to tint the icon.