Package-level declarations

Functions

Link copied to clipboard
fun <T> SettingsSegmented(title: @Composable () -> Unit, items: List<T>, selectedItem: T?, onItemSelected: (T) -> Unit, itemTitleMap: (T) -> CharSequence, modifier: Modifier = Modifier, enabled: Boolean = LocalSettingsGroupEnabled.current, colors: SettingsTileColors = SettingsTileDefaults.colors(), buttonSpace: Dp = SegmentedButtonDefaults.BorderWidth, buttonShape: @Composable (Int) -> Shape = { index -> SegmentedButtonDefaults.itemShape( index = index, count = items.size, ) }, buttonColors: SegmentedButtonColors = SegmentedButtonDefaults.colors( activeContainerColor = colors.actionColor(enabled).copy(alpha = 0.4f) .compositeOver(MaterialTheme.colorScheme.surfaceContainerLowest), inactiveContainerColor = colors.containerColor, activeContentColor = colors.subtitleColor(enabled), inactiveContentColor = colors.subtitleColor(enabled), activeBorderColor = colors.subtitleColor, inactiveBorderColor = colors.subtitleColor, disabledActiveContainerColor = colors.actionColor(enabled).copy(alpha = 0.12f) .compositeOver(MaterialTheme.colorScheme.surfaceContainerLowest), disabledInactiveContainerColor = MaterialTheme.colorScheme.surface .copy(alpha = SettingsTileDefaults.DisabledAlpha) .compositeOver(colors.containerColor), disabledActiveContentColor = colors.subtitleColor(enabled), disabledInactiveContentColor = colors.subtitleColor(enabled), disabledActiveBorderColor = colors.subtitleColor(enabled), disabledInactiveBorderColor = colors.subtitleColor(enabled), ), buttonIcon: @Composable (Boolean) -> Unit = { selected -> SegmentedButtonDefaults.Icon(selected) }, subtitle: @Composable () -> Unit? = null, icon: @Composable () -> Unit? = null, tonalElevation: Dp = SettingsTileDefaults.Elevation, shadowElevation: Dp = SettingsTileDefaults.Elevation)
Link copied to clipboard
fun SettingsSlider(title: @Composable () -> Unit, value: Float, onValueChange: (Float) -> Unit, modifier: Modifier = Modifier, subtitle: @Composable () -> Unit? = null, icon: @Composable () -> Unit? = null, enabled: Boolean = LocalSettingsGroupEnabled.current, valueRange: ClosedFloatingPointRange<Float> = 0f..1f, steps: Int = 0, onValueChangeFinished: () -> Unit? = null, colors: SettingsTileColors = SettingsTileDefaults.colors(), sliderColors: SliderColors = SliderDefaults.colors( thumbColor = colors.actionColor(enabled), activeTrackColor = colors.actionColor(enabled), inactiveTrackColor = colors.actionColor(enabled).copy(alpha = 0.12f), ), tonalElevation: Dp = SettingsTileDefaults.Elevation, shadowElevation: Dp = SettingsTileDefaults.Elevation)