Android
public object ToggleButtonDefaults
Contains the default values used by ToggleButton.
Functions
toggleButtonColors
@Composable
public fun toggleButtonColors(
checkedBackgroundColor: Color = MaterialTheme.colors.primary,
checkedContentColor: Color = contentColorFor(checkedBackgroundColor),
disabledCheckedBackgroundColor: Color =
checkedBackgroundColor.copy(alpha = ContentAlpha.disabled),
disabledCheckedContentColor: Color = MaterialTheme.colors.background,
uncheckedBackgroundColor: Color = MaterialTheme.colors.surface,
uncheckedContentColor: Color = contentColorFor(uncheckedBackgroundColor),
disabledUncheckedBackgroundColor: Color =
uncheckedBackgroundColor.copy(alpha = ContentAlpha.disabled),
disabledUncheckedContentColor: Color =
uncheckedContentColor.copy(alpha = ContentAlpha.disabled),
): ToggleButtonColors
Creates a ToggleButtonColors that represents the background and content colors used in a ToggleButton. Defaults to primary-styled checked colors and surface-styled unchecked colors.
Parameters
| checkedBackgroundColor | the background color of this ToggleButton when enabled and checked |
| checkedContentColor | the content color of this ToggleButton when enabled and checked |
| disabledCheckedBackgroundColor | the background color of this ToggleButton when checked and not enabled |
| disabledCheckedContentColor | the content color of this ToggleButton when checked and not enabled |
| uncheckedBackgroundColor | the background color of this ToggleButton when enabled and unchecked |
| uncheckedContentColor | the content color of this ToggleButton when enabled and unchecked |
| disabledUncheckedBackgroundColor | the background color of this ToggleButton when unchecked and not enabled |
| disabledUncheckedContentColor | the content color of this ToggleButton when unchecked and not enabled |