Package-level declarations

Types

Link copied to clipboard
sealed class ButtonSize
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Contains the default values used by ToggleButton.

Functions

Link copied to clipboard
fun AlertContent(onCancel: () -> Unit? = null, onOk: () -> Unit? = null, icon: @Composable () -> Unit? = null, title: String? = null, message: String? = null, okButtonContentDescription: String = stringResource(android.R.string.ok), cancelButtonContentDescription: String = stringResource(android.R.string.cancel), state: ScalingLazyColumnState = rememberColumnState( ScalingLazyColumnDefaults.responsive( additionalPaddingAtBottom = 0.dp, ), ), showPositionIndicator: Boolean = true, content: ScalingLazyListScope.() -> Unit? = null)
Link copied to clipboard
fun AlertDialog(showDialog: Boolean, onDismiss: () -> Unit, modifier: Modifier = Modifier, icon: @Composable () -> Unit? = null, title: String? = null, message: String? = null, state: ScalingLazyColumnState = rememberColumnState( ScalingLazyColumnDefaults.responsive(), ), content: ScalingLazyListScope.() -> Unit? = null)
fun AlertDialog(showDialog: Boolean, onCancel: () -> Unit, onOk: () -> Unit, modifier: Modifier = Modifier, icon: @Composable () -> Unit? = null, title: String? = null, message: String? = null, okButtonContentDescription: String = stringResource(android.R.string.ok), cancelButtonContentDescription: String = stringResource(android.R.string.cancel), state: ScalingLazyColumnState = rememberColumnState( ScalingLazyColumnDefaults.responsive(), ), content: ScalingLazyListScope.() -> Unit? = null)

This component is an alternative to AlertContent, providing the following:

Link copied to clipboard
fun Button(imageVector: ImageVector, contentDescription: String, onClick: () -> Unit, modifier: Modifier = Modifier, onLongClick: () -> Unit? = null, colors: ButtonColors = ButtonDefaults.primaryButtonColors(), buttonSize: ButtonSize = ButtonSize.Default, iconRtlMode: IconRtlMode = IconRtlMode.Default, enabled: Boolean = true)
fun Button(@DrawableRes id: Int, contentDescription: String, onClick: () -> Unit, modifier: Modifier = Modifier, onLongClick: () -> Unit? = null, colors: ButtonColors = ButtonDefaults.primaryButtonColors(), buttonSize: ButtonSize = ButtonSize.Default, iconRtlMode: IconRtlMode = IconRtlMode.Default, enabled: Boolean = true)

This component is an alternative to Button, providing the following:

Link copied to clipboard
fun Card(onClick: () -> Unit, modifier: Modifier = Modifier, onLongClick: () -> Unit? = null, backgroundPainter: Painter = CardDefaults.cardBackgroundPainter(), contentColor: Color = MaterialTheme.colors.onSurfaceVariant, enabled: Boolean = true, contentPadding: PaddingValues = CardDefaults.ContentPadding, shape: Shape = MaterialTheme.shapes.large, role: Role? = null, content: @Composable () -> Unit)

This component is an alternative to Card, adding support for long and double-clicks.

Link copied to clipboard
fun Chip(label: String, onClick: () -> Unit, modifier: Modifier = Modifier, onLongClick: () -> Unit? = null, secondaryLabel: String? = null, icon: @Composable BoxScope.() -> Unit? = null, largeIcon: Boolean = false, colors: ChipColors = ChipDefaults.primaryChipColors(), enabled: Boolean = true)
fun Chip(@StringRes labelId: Int, onClick: () -> Unit, modifier: Modifier = Modifier, onLongClick: () -> Unit? = null, @StringRes secondaryLabel: Int? = null, iconRtlMode: IconRtlMode = IconRtlMode.Default, icon: Paintable? = null, largeIcon: Boolean = false, colors: ChipColors = ChipDefaults.primaryChipColors(), enabled: Boolean = true)
fun Chip(label: String, onClick: () -> Unit, modifier: Modifier = Modifier, onLongClick: () -> Unit? = null, secondaryLabel: String? = null, iconRtlMode: IconRtlMode = IconRtlMode.Default, icon: Paintable? = null, largeIcon: Boolean = false, colors: ChipColors = ChipDefaults.primaryChipColors(), enabled: Boolean = true)

This component is an alternative to Chip, providing the following:

fun Chip(onClick: () -> Unit, colors: ChipColors, border: ChipBorder, modifier: Modifier = Modifier, onLongClick: () -> Unit? = null, enabled: Boolean = true, contentPadding: PaddingValues = ChipDefaults.ContentPadding, shape: Shape = MaterialTheme.shapes.large, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, role: Role = Role.Button, content: @Composable BoxScope.() -> Unit)
fun Chip(label: @Composable RowScope.() -> Unit, onClick: () -> Unit, modifier: Modifier = Modifier, onLongClick: () -> Unit? = null, secondaryLabel: @Composable RowScope.() -> Unit? = null, icon: @Composable BoxScope.() -> Unit? = null, colors: ChipColors = ChipDefaults.primaryChipColors(), enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, contentPadding: PaddingValues = ChipDefaults.ContentPadding, shape: Shape = MaterialTheme.shapes.large, border: ChipBorder = ChipDefaults.chipBorder())

Temporary copy of Wear Compose Material Chip with support for onLongClick.

Link copied to clipboard
fun ChipIconWithProgress(modifier: Modifier = Modifier, icon: Paintable? = null, largeIcon: Boolean = false, progressIndicatorColor: Color = MaterialTheme.colors.primary, progressTrackColor: Color = MaterialTheme.colors.onSurface.copy(alpha = 0.10f))

A default icon implementation to be used with a Chip that accepts an icon as slot. This implementation displays an icon with a circular progress indicator around it. The progress indicator is in an indeterminate state and spins indefinitely.

fun ChipIconWithProgress(progress: Float, modifier: Modifier = Modifier, icon: Paintable? = null, largeIcon: Boolean = false, progressIndicatorColor: Color = MaterialTheme.colors.primary, progressTrackColor: Color = MaterialTheme.colors.onSurface.copy(alpha = 0.10f))

A default icon implementation to be used with a Chip that accepts an icon as slot. This implementation displays an icon with a circular progress indicator around it. The progress indicator express the proportion of completion of an ongoing task.

Link copied to clipboard
fun CompactChip(icon: Paintable, contentDescription: String, onClick: () -> Unit, modifier: Modifier = Modifier, iconRtlMode: IconRtlMode = IconRtlMode.Default, colors: ChipColors = ChipDefaults.primaryChipColors(), enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, border: ChipBorder = ChipDefaults.chipBorder())
fun CompactChip(@StringRes labelId: Int, onClick: () -> Unit, modifier: Modifier = Modifier, icon: Paintable? = null, iconRtlMode: IconRtlMode = IconRtlMode.Default, colors: ChipColors = ChipDefaults.primaryChipColors(), enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, border: ChipBorder = ChipDefaults.chipBorder())
fun CompactChip(label: String, onClick: () -> Unit, modifier: Modifier = Modifier, icon: Paintable? = null, iconRtlMode: IconRtlMode = IconRtlMode.Default, colors: ChipColors = ChipDefaults.primaryChipColors(), enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, border: ChipBorder = ChipDefaults.chipBorder())

This component is an alternative to CompactChip, providing the following:

Link copied to clipboard
fun Confirmation(showDialog: Boolean, onTimeout: () -> Unit, modifier: Modifier = Modifier, icon: @Composable () -> Unit? = null, title: String? = null, durationMillis: Long = DialogDefaults.ShortDurationMillis, columnState: ScalingLazyColumnState = rememberColumnState( ScalingLazyColumnDefaults.responsive( verticalArrangement = DialogDefaults.ConfirmationVerticalArrangement, additionalPaddingAtBottom = 0.dp, ), ))

This component is an alternative to ConfirmationContent, providing the following:

fun Confirmation(onTimeout: () -> Unit, modifier: Modifier = Modifier, icon: @Composable ColumnScope.() -> Unit? = null, scrollState: ScalingLazyListState = rememberScalingLazyListState(), durationMillis: Long = DialogDefaults.ShortDurationMillis, backgroundColor: Color = MaterialTheme.colors.background, contentColor: Color = contentColorFor(backgroundColor), iconColor: Color = contentColor, verticalArrangement: Arrangement.Vertical = DialogDefaults.ConfirmationVerticalArrangement, contentPadding: PaddingValues = DialogDefaults.ContentPadding, content: @Composable ColumnScope.() -> Unit)

A wrapper for Confirmation component, that calculates the value passed to durationMillis for accessibility.

Link copied to clipboard
fun ConfirmationContent(icon: @Composable () -> Unit? = null, title: String? = null, columnState: ScalingLazyColumnState = rememberColumnState( ScalingLazyColumnDefaults.responsive( verticalArrangement = DialogDefaults.ConfirmationVerticalArrangement, additionalPaddingAtBottom = 0.dp, ), ), showPositionIndicator: Boolean = true)
Link copied to clipboard
fun Icon(paintable: PaintableIcon, contentDescription: String?, modifier: Modifier = Modifier, tint: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), rtlMode: IconRtlMode = IconRtlMode.Default)

This component is an alternative to Icon, providing the following:

Link copied to clipboard
fun OutlinedChip(label: String, onClick: () -> Unit, modifier: Modifier = Modifier, secondaryLabel: String? = null, icon: @Composable BoxScope.() -> Unit? = null, largeIcon: Boolean = false, colors: ChipColors = ChipDefaults.outlinedChipColors(), enabled: Boolean = true)
fun OutlinedChip(@StringRes labelId: Int, onClick: () -> Unit, modifier: Modifier = Modifier, iconRtlMode: IconRtlMode = IconRtlMode.Default, @StringRes secondaryLabel: Int? = null, icon: Paintable? = null, largeIcon: Boolean = false, colors: ChipColors = ChipDefaults.outlinedChipColors(), enabled: Boolean = true)
fun OutlinedChip(label: String, onClick: () -> Unit, modifier: Modifier = Modifier, iconRtlMode: IconRtlMode = IconRtlMode.Default, secondaryLabel: String? = null, icon: Paintable? = null, largeIcon: Boolean = false, colors: ChipColors = ChipDefaults.outlinedChipColors(), enabled: Boolean = true)

This component is an alternative to OutlinedChip, providing the following:

Link copied to clipboard
fun OutlinedCompactChip(icon: Paintable, contentDescription: String, onClick: () -> Unit, modifier: Modifier = Modifier, iconRtlMode: IconRtlMode = IconRtlMode.Default, colors: ChipColors = ChipDefaults.outlinedChipColors(), enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, border: ChipBorder = ChipDefaults.outlinedChipBorder())
fun OutlinedCompactChip(@StringRes labelId: Int, onClick: () -> Unit, modifier: Modifier = Modifier, icon: Paintable? = null, iconRtlMode: IconRtlMode = IconRtlMode.Default, colors: ChipColors = ChipDefaults.outlinedChipColors(), enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, border: ChipBorder = ChipDefaults.outlinedChipBorder())
fun OutlinedCompactChip(label: String, onClick: () -> Unit, modifier: Modifier = Modifier, icon: Paintable? = null, iconRtlMode: IconRtlMode = IconRtlMode.Default, colors: ChipColors = ChipDefaults.outlinedChipColors(), enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, border: ChipBorder = ChipDefaults.outlinedChipBorder())

This component is an alternative to OutlinedCompactChip, providing the following:

Link copied to clipboard
fun ResponsiveDialogContent(modifier: Modifier = Modifier, icon: @Composable () -> Unit? = null, title: @Composable () -> Unit? = null, message: @Composable () -> Unit? = null, onOk: () -> Unit? = null, onCancel: () -> Unit? = null, okButtonContentDescription: String = stringResource(R.string.ok), cancelButtonContentDescription: String = stringResource(R.string.cancel), state: ScalingLazyColumnState = rememberColumnState( responsive( firstItemIsFullWidth = icon == null, additionalPaddingAtBottom = 0.dp, ), ), showPositionIndicator: Boolean = true, content: ScalingLazyListScope.() -> Unit? = null)
Link copied to clipboard
fun ResponsiveListHeader(modifier: Modifier = Modifier, backgroundColor: Color = Color.Transparent, contentColor: Color = MaterialTheme.colors.onSurfaceVariant, contentPadding: PaddingValues = ListHeaderDefaults.itemPadding(), content: @Composable RowScope.() -> Unit)
Link copied to clipboard
fun SecondaryTitle(@StringRes textId: Int, modifier: Modifier = Modifier, icon: ImageVector? = null, iconSize: Dp = 24.dp, iconRtlMode: IconRtlMode = IconRtlMode.Default)
fun SecondaryTitle(text: String, modifier: Modifier = Modifier, icon: ImageVector? = null, iconTint: Color = MaterialTheme.colors.onBackground, iconSize: Dp = 24.dp, iconRtlMode: IconRtlMode = IconRtlMode.Default)

A secondary title heading to group and identify items with optional icon.

Link copied to clipboard
fun SplitToggleChip(checked: Boolean, onCheckedChanged: (Boolean) -> Unit, label: String, onClick: () -> Unit, toggleControl: ToggleChipToggleControl, modifier: Modifier = Modifier, secondaryLabel: String? = null, colors: SplitToggleChipColors = ToggleChipDefaults.splitToggleChipColors(), enabled: Boolean = true, checkedInteractionSource: MutableInteractionSource = remember { MutableInteractionSource() }, clickInteractionSource: MutableInteractionSource = remember { MutableInteractionSource() })

This component is an alternative to SplitToggleChip, providing the following:

Link copied to clipboard
fun Stepper(value: Int, onValueChange: (Int) -> Unit, valueProgression: IntProgression, modifier: Modifier = Modifier, decreaseIcon: @Composable () -> Unit = { Icon( StepperDefaults.Decrease.asPaintable(), stringResource(R.string.horologist_stepper_decrease_content_description), ) }, increaseIcon: @Composable () -> Unit = { Icon( StepperDefaults.Increase.asPaintable(), stringResource(R.string.horologist_stepper_increase_content_description), ) }, backgroundColor: Color = MaterialTheme.colors.background, contentColor: Color = contentColorFor(backgroundColor), iconColor: Color = contentColor, enableRangeSemantics: Boolean = true, content: @Composable BoxScope.() -> Unit)
fun Stepper(value: Float, onValueChange: (Float) -> Unit, steps: Int, modifier: Modifier = Modifier, decreaseIcon: @Composable () -> Unit = { Icon( StepperDefaults.Decrease.asPaintable(), stringResource(R.string.horologist_stepper_decrease_content_description), ) }, increaseIcon: @Composable () -> Unit = { Icon( StepperDefaults.Increase.asPaintable(), stringResource(R.string.horologist_stepper_increase_content_description), ) }, valueRange: ClosedFloatingPointRange<Float> = 0f..(steps + 1).toFloat(), backgroundColor: Color = MaterialTheme.colors.background, contentColor: Color = contentColorFor(backgroundColor), iconColor: Color = contentColor, enableRangeSemantics: Boolean = true, content: @Composable BoxScope.() -> Unit)

Wrapper for androidx.wear.compose.material.Stepper with default RSB scroll support.

Link copied to clipboard
fun Title(@StringRes textId: Int, modifier: Modifier = Modifier)
fun Title(text: String, modifier: Modifier = Modifier)

A primary title heading to group and identify items.

Link copied to clipboard
fun ToggleButton(text: String, onCheckedChanged: (Boolean) -> Unit, modifier: Modifier = Modifier, checked: Boolean = true, enabled: Boolean = true, colors: ToggleButtonColors = ToggleButtonDefaults.toggleButtonColors(), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, shape: Shape = CircleShape, role: Role = ToggleButtonDefaults.DefaultRole, smallSize: Boolean = false)

This component is an alternative to ToggleButton, providing the following:

fun ToggleButton(checkedIcon: PaintableIcon, notCheckedIcon: PaintableIcon, contentDescription: String, onCheckedChanged: (Boolean) -> Unit, modifier: Modifier = Modifier, checked: Boolean = true, enabled: Boolean = true, colors: ToggleButtonColors = ToggleButtonDefaults.toggleButtonColors(), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, shape: Shape = CircleShape, role: Role = ToggleButtonDefaults.DefaultRole, iconRtlMode: IconRtlMode = IconRtlMode.Default, smallSize: Boolean = false)

§ This component is an alternative to ToggleButton, providing the following:

Link copied to clipboard
fun ToggleChip(checked: Boolean, onCheckedChanged: (Boolean) -> Unit, label: String, toggleControl: ToggleChipToggleControl, modifier: Modifier = Modifier, icon: ImageVector? = null, iconRtlMode: IconRtlMode = IconRtlMode.Default, secondaryLabel: String? = null, colors: ToggleChipColors = ToggleChipDefaults.toggleChipColors(), enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })

This component is an alternative to ToggleChip, providing the following: