SegmentedControlItem

The items that can be displayed in a segmented control. There are two types of items: Text and Icon. You can either do all text or all icons in a segmented control, but not a mix of both.

Inheritors

Types

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

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

Link copied to clipboard
data class Text<T>(val key: T, val label: String, val interactionSource: MutableInteractionSource? = null) : SegmentedControlItem<T>

A text item that can be displayed in a segmented control.

Properties

Link copied to clipboard

The interaction source for the item.

Link copied to clipboard
open val key: T

Unique identifier for each item in the group list.