selectionIndicator

fun selectionIndicator(style: PickerStyle, color: Color = style.colors.dividerColor, thickness: Dp = style.dividerThickness, shape: Shape = style.dividerShape, horizontalInset: Dp = SelectionIndicatorHorizontalInset, isVisible: Boolean = style.isDividerVisible, disabledColor: Color = style.colors.disabledDividerColor): PickerSelectionIndicator

Creates a PickerSelectionIndicator for composite pickers (e.g. io.github.kezlab.compose.pickers.time.TimePicker, io.github.kezlab.compose.pickers.date.DatePicker).

Composite pickers render a single selection band spanning the whole picker instead of one divider per column, so per-column PickerStyle divider settings do not apply to them. The defaults derive from style so existing divider customizations carry over.

Return

A PickerSelectionIndicator instance with the specified values.

Parameters

style

The picker style used to derive default indicator values.

color

The color of the selection band lines.

thickness

The thickness of each selection band line.

shape

The shape of each selection band line.

horizontalInset

The inset applied to each side of the band so it can be narrower than the full picker width while staying centered.

isVisible

Whether the selection band is drawn.

disabledColor

The color of the selection band lines when the composite picker is disabled.


fun selectionIndicator(color: Color = LocalContentColor.current.copy(alpha = 0.2f), thickness: Dp = DividerThickness, shape: Shape = DividerShape, horizontalInset: Dp = SelectionIndicatorHorizontalInset, isVisible: Boolean = true, disabledColor: Color = color.copy(alpha = color.alpha * DISABLED_CONTAINER_ALPHA)): PickerSelectionIndicator

Creates a PickerSelectionIndicator without requiring a PickerStyle.

Use this overload when only the composite selection band itself should be customized, for example PickerDefaults.selectionIndicator(horizontalInset = 16.dp). Use the style-based overload when a custom PickerStyle should drive indicator defaults.

Return

A PickerSelectionIndicator instance with the specified values.

Parameters

color

The color of the selection band lines.

thickness

The thickness of each selection band line.

shape

The shape of each selection band line.

horizontalInset

The inset applied to each side of the band so it can be narrower than the full picker width while staying centered.

isVisible

Whether the selection band is drawn.

disabledColor

The color of the selection band lines when the composite picker is disabled.