Icon

data class Icon<T>(val key: T, @DrawableRes val resource: Int, val contentDescription: String?, val tint: Color? = null, val interactionSource: MutableInteractionSource? = null) : SegmentedControlItem<T> (source)

An icon item that can be displayed in a segmented control.

Parameters

T

The type of the key used to uniquely identify each item.

Constructors

Link copied to clipboard
constructor(key: T, @DrawableRes resource: Int, contentDescription: String?, tint: Color? = null, interactionSource: MutableInteractionSource? = null)

Properties

Link copied to clipboard

The content description of the icon.

Link copied to clipboard

The interaction source for the item.

Link copied to clipboard
open override val key: T

Unique identifier for each item in the group list.

Link copied to clipboard

The resource id of the icon to be displayed.

Link copied to clipboard
val tint: Color?

The tint of the icon. If not provided, the default text color will be used.