SegmentedButtonDefaults

Properties

Link copied to clipboard
@get:Composable
@get:ReadOnlyComposable
val baseShape: CornerBasedShape

The shape of the segmented button container, for correct behavior this should or the desired CornerBasedShape should be used with itemShape and passed to each segmented button.

Link copied to clipboard
val BorderWidth: Dp

Default border width used in segmented button

Link copied to clipboard
val IconSize: Dp

Icon size to use for icons used in SegmentedButton

Functions

Link copied to clipboard
@Composable
fun ActiveIcon()

And icon to indicate the segmented button is checked or selected

Link copied to clipboard
fun borderStroke(color: Color, width: Dp = BorderWidth): BorderStroke

Default factory for Segmented Button BorderStroke can be customized through width, and color. When using a width different than default make sure to also update MultiChoiceSegmentedButtonRow or SingleChoiceSegmentedButtonRow space param.

Link copied to clipboard
@Composable
fun colors(): SegmentedButtonColors
@Composable
fun colors(activeContainerColor: Color = Color.Unspecified, activeContentColor: Color = Color.Unspecified, activeBorderColor: Color = Color.Unspecified, inactiveContainerColor: Color = Color.Unspecified, inactiveContentColor: Color = Color.Unspecified, inactiveBorderColor: Color = Color.Unspecified, disabledActiveContainerColor: Color = Color.Unspecified, disabledActiveContentColor: Color = Color.Unspecified, disabledActiveBorderColor: Color = Color.Unspecified, disabledInactiveContainerColor: Color = Color.Unspecified, disabledInactiveContentColor: Color = Color.Unspecified, disabledInactiveBorderColor: Color = Color.Unspecified): SegmentedButtonColors

Creates a SegmentedButtonColors that represents the different colors used in a SegmentedButton in different states.

Link copied to clipboard
@Composable
fun Icon(active: Boolean, activeContent: @Composable () -> Unit = { ActiveIcon() }, inactiveContent: @Composable () -> Unit? = null)

The default implementation of icons for Segmented Buttons.

Link copied to clipboard
@Composable
@ReadOnlyComposable
fun itemShape(index: Int, count: Int, baseShape: CornerBasedShape = this.baseShape): Shape

A shape constructor that the button in index should have when there are count buttons in the container.