Android
public object SwitchButtonDefaults
Contains the default values used by SwitchButtons and SplitSwitchButtons
Functions
switchButtonColors
@Composable
public fun switchButtonColors(): SwitchButtonColors
Creates a SwitchButtonColors for use in a SwitchButton.
switchButtonColors
@Composable
public fun switchButtonColors(
checkedContainerColor: Color = Color.Unspecified,
checkedContentColor: Color = Color.Unspecified,
checkedSecondaryContentColor: Color = Color.Unspecified,
checkedIconColor: Color = Color.Unspecified,
checkedThumbColor: Color = Color.Unspecified,
checkedThumbIconColor: Color = Color.Unspecified,
checkedTrackColor: Color = Color.Unspecified,
checkedTrackBorderColor: Color = Color.Unspecified,
uncheckedContainerColor: Color = Color.Unspecified,
uncheckedContentColor: Color = Color.Unspecified,
uncheckedSecondaryContentColor: Color = Color.Unspecified,
uncheckedIconColor: Color = Color.Unspecified,
uncheckedThumbColor: Color = Color.Unspecified,
uncheckedTrackColor: Color = Color.Unspecified,
uncheckedTrackBorderColor: Color = Color.Unspecified,
disabledCheckedContainerColor: Color = Color.Unspecified,
disabledCheckedContentColor: Color = Color.Unspecified,
disabledCheckedSecondaryContentColor: Color = Color.Unspecified,
disabledCheckedIconColor: Color = Color.Unspecified,
disabledCheckedThumbColor: Color = Color.Unspecified,
disabledCheckedThumbIconColor: Color = Color.Unspecified,
disabledCheckedTrackColor: Color = Color.Unspecified,
disabledCheckedTrackBorderColor: Color = Color.Unspecified,
disabledUncheckedContainerColor: Color = Color.Unspecified,
disabledUncheckedContentColor: Color = Color.Unspecified,
disabledUncheckedSecondaryContentColor: Color = Color.Unspecified,
disabledUncheckedIconColor: Color = Color.Unspecified,
disabledUncheckedThumbColor: Color = Color.Unspecified,
disabledUncheckedTrackBorderColor: Color = Color.Unspecified,
): SwitchButtonColors
Creates a SwitchButtonColors for use in a SwitchButton.
Parameters
| checkedContainerColor | The container color of the SwitchButton when enabled and checked. |
| checkedContentColor | The content color of the SwitchButton when enabled and checked. |
| checkedSecondaryContentColor | The secondary content color of the SwitchButton when enabled and checked, used for secondaryLabel content. |
| checkedIconColor | The icon color of the SwitchButton when enabled and checked. |
| checkedThumbColor | The thumb color of the SwitchButton when enabled and checked. |
| checkedThumbIconColor | The thumb icon color of the SwitchButton when enabled and checked. |
| checkedTrackColor | The track color of the SwitchButton when enabled and checked. |
| checkedTrackBorderColor | The track border color of the SwitchButton when enabled and checked |
| uncheckedContainerColor | The container color of the SwitchButton when enabled and unchecked. |
| uncheckedContentColor | The content color of a SwitchButton when enabled and unchecked. |
| uncheckedSecondaryContentColor | The secondary content color of this SwitchButton when enabled and unchecked, used for secondaryLabel content |
| uncheckedIconColor | The icon color of the SwitchButton when enabled and unchecked. |
| uncheckedThumbColor | The thumb color of the SwitchButton when enabled and unchecked. |
| uncheckedTrackColor | The track color of the SwitchButton when enabled and unchecked. |
| uncheckedTrackBorderColor | The track border color of the SwitchButton when enabled and unchecked |
| disabledCheckedContainerColor | The container color of the SwitchButton when disabled and checked. |
| disabledCheckedContentColor | The content color of the SwitchButton when disabled and checked. |
| disabledCheckedSecondaryContentColor | The secondary content color of the SwitchButton when disabled and checked, used for secondaryLabel content. |
| disabledCheckedIconColor | The icon color of the SwitchButton when disabled and checked. |
| disabledCheckedThumbColor | The thumb color of the SwitchButton when disabled and checked. |
| disabledCheckedThumbIconColor | The thumb icon color of the SwitchButton when disabled and checked. |
| disabledCheckedTrackColor | The track color of the SwitchButton when disabled and checked. |
| disabledCheckedTrackBorderColor | The track border color of the SwitchButton when disabled and checked |
| disabledUncheckedContainerColor | The container color of the SwitchButton when disabled and unchecked. |
| disabledUncheckedContentColor | The content color of a SwitchButton when disabled and unchecked. |
| disabledUncheckedSecondaryContentColor | The secondary content color of this SwitchButton when disabled and unchecked, used for secondaryLabel content |
| disabledUncheckedIconColor | The icon color of the SwitchButton when disabled and unchecked. |
| disabledUncheckedThumbColor | The thumb color of the SwitchButton when disabled and unchecked. |
| disabledUncheckedTrackBorderColor | The track border color of the SwitchButton when disabled and unchecked |
splitSwitchButtonColors
@Composable
public fun splitSwitchButtonColors(): SplitSwitchButtonColors
Creates a SplitSwitchButtonColors for use in a SplitSwitchButton.
splitSwitchButtonColors
@Composable
public fun splitSwitchButtonColors(
checkedContainerColor: Color = Color.Unspecified,
checkedContentColor: Color = Color.Unspecified,
checkedSecondaryContentColor: Color = Color.Unspecified,
checkedSplitContainerColor: Color = Color.Unspecified,
checkedThumbColor: Color = Color.Unspecified,
checkedThumbIconColor: Color = Color.Unspecified,
checkedTrackColor: Color = Color.Unspecified,
checkedTrackBorderColor: Color = Color.Unspecified,
uncheckedContainerColor: Color = Color.Unspecified,
uncheckedContentColor: Color = Color.Unspecified,
uncheckedSecondaryContentColor: Color = Color.Unspecified,
uncheckedSplitContainerColor: Color = Color.Unspecified,
uncheckedThumbColor: Color = Color.Unspecified,
uncheckedTrackColor: Color = Color.Unspecified,
uncheckedTrackBorderColor: Color = Color.Unspecified,
disabledCheckedContainerColor: Color = Color.Unspecified,
disabledCheckedContentColor: Color = Color.Unspecified,
disabledCheckedSecondaryContentColor: Color = Color.Unspecified,
disabledCheckedSplitContainerColor: Color = Color.Unspecified,
disabledCheckedThumbColor: Color = Color.Unspecified,
disabledCheckedThumbIconColor: Color = Color.Unspecified,
disabledCheckedTrackColor: Color = Color.Unspecified,
disabledCheckedTrackBorderColor: Color = Color.Unspecified,
disabledUncheckedContainerColor: Color = Color.Unspecified,
disabledUncheckedContentColor: Color = Color.Unspecified,
disabledUncheckedSecondaryContentColor: Color = Color.Unspecified,
disabledUncheckedSplitContainerColor: Color = Color.Unspecified,
disabledUncheckedThumbColor: Color = Color.Unspecified,
disabledUncheckedTrackBorderColor: Color = Color.Unspecified,
): SplitSwitchButtonColors
Creates a SplitSwitchButtonColors for use in a SplitSwitchButton.
Parameters
| checkedContainerColor | The container color of the SplitSwitchButton when enabled and checked. |
| checkedContentColor | The content color of the SplitSwitchButton when enabled and checked. |
| checkedSecondaryContentColor | The secondary content color of the SplitSwitchButton when enabled and checked, used for secondaryLabel content. |
| checkedSplitContainerColor | The split container color of the SplitSwitchButton when enabled and checked. |
| checkedThumbColor | The thumb color of the SplitSwitchButton when enabled and checked. |
| checkedThumbIconColor | The thumb icon color of the SplitSwitchButton when enabled and checked. |
| checkedTrackColor | The track color of the SplitSwitchButton when enabled and checked. |
| checkedTrackBorderColor | The track border color of the SplitSwitchButton when enabled and checked |
| uncheckedContainerColor | The container color of the SplitSwitchButton when enabled and unchecked. |
| uncheckedContentColor | The content color of the SplitSwitchButton when enabled and unchecked. |
| uncheckedSecondaryContentColor | The secondary content color of the SplitSwitchButton when enabled and unchecked, used for secondaryLabel content. |
| uncheckedSplitContainerColor | The split container color of the SplitSwitchButton when enabled and unchecked. |
| uncheckedThumbColor | The thumb color of the SplitSwitchButton when enabled and unchecked. |
| uncheckedTrackColor | The track color of the SplitSwitchButton when enabled and unchecked. |
| uncheckedTrackBorderColor | The track border color of the SplitSwitchButton when enabled and unchecked |
| disabledCheckedContainerColor | The container color of the SplitSwitchButton when disabled and checked. |
| disabledCheckedContentColor | The content color of the SplitSwitchButton when disabled and checked. |
| disabledCheckedSecondaryContentColor | The secondary content color of the SplitSwitchButton when disabled and checked, used for secondaryLabel content. |
| disabledCheckedSplitContainerColor | The split container color of the SplitSwitchButton when disabled and checked. |
| disabledCheckedThumbColor | The thumb color of the SplitSwitchButton when disabled and checked. |
| disabledCheckedThumbIconColor | The thumb icon color of the SplitSwitchButton when disabled and checked. |
| disabledCheckedTrackColor | The track color of the SplitSwitchButton when disabled and checked. |
| disabledCheckedTrackBorderColor | The track border color of the SplitSwitchButton when disabled and checked |
| disabledUncheckedContainerColor | The container color of the SplitSwitchButton when disabled and unchecked. |
| disabledUncheckedContentColor | The content color of the SplitSwitchButton when disabled and unchecked. |
| disabledUncheckedSecondaryContentColor | The secondary content color of the SplitSwitchButton when disabled and unchecked, used for secondaryLabel content. |
| disabledUncheckedSplitContainerColor | The split container color of the SplitSwitchButton when disabled and unchecked. |
| disabledUncheckedThumbColor | The thumb color of the SplitSwitchButton when disabled and unchecked. |
| disabledUncheckedTrackBorderColor | The track border color of the SplitSwitchButton when disabled and unchecked |