SwitchButtonColors

Class

Android
public class SwitchButtonColors(
    public val checkedContainerColor: Color,
    public val checkedContentColor: Color,
    public val checkedSecondaryContentColor: Color,
    public val checkedIconColor: Color,
    public val checkedThumbColor: Color,
    public val checkedThumbIconColor: Color,
    public val checkedTrackBorderColor: Color,
    public val checkedTrackColor: Color,
    public val uncheckedContainerColor: Color,
    public val uncheckedContentColor: Color,
    public val uncheckedSecondaryContentColor: Color,
    public val uncheckedIconColor: Color,
    public val uncheckedThumbColor: Color,
    public val uncheckedTrackColor: Color,
    public val uncheckedTrackBorderColor: Color,
    public val disabledCheckedContainerColor: Color,
    public val disabledCheckedContentColor: Color,
    public val disabledCheckedSecondaryContentColor: Color,
    public val disabledCheckedIconColor: Color,
    public val disabledCheckedThumbColor: Color,
    public val disabledCheckedThumbIconColor: Color,
    public val disabledCheckedTrackColor: Color,
    public val disabledCheckedTrackBorderColor: Color,
    public val disabledUncheckedContainerColor: Color,
    public val disabledUncheckedContentColor: Color,
    public val disabledUncheckedSecondaryContentColor: Color,
    public val disabledUncheckedIconColor: Color,
    public val disabledUncheckedThumbColor: Color,
    public val disabledUncheckedTrackBorderColor: Color,
)

Represents the different container and content colors used for SwitchButton, in various states, that are checked, unchecked, enabled and disabled.

Parameters

checkedContainerColorContainer or background color when the SwitchButton is checked
checkedContentColorColor of the content like label when the SwitchButton is checked
checkedSecondaryContentColorColor of the secondary content like secondary label when the SwitchButton is checked
checkedIconColorColor of the icon when the SwitchButton is checked
checkedThumbColorColor of the thumb when the SwitchButton is checked
checkedThumbIconColorColor of the thumb icon when the SwitchButton is checked
checkedTrackColorColor of the track when the SwitchButton is checked
checkedTrackBorderColorColor of the track boarder when the SwitchButton is checked
uncheckedContainerColorContainer or background color when the SwitchButton is unchecked
uncheckedContentColorColor of the content like label when the SwitchButton is unchecked
uncheckedSecondaryContentColorColor of the secondary content like secondary label when the SwitchButton is unchecked
uncheckedIconColorColor of the icon when the SwitchButton is unchecked
uncheckedThumbColorColor of the thumb when the SwitchButton is unchecked
uncheckedTrackColorColor of the track when the SwitchButton is unchecked
uncheckedTrackBorderColorColor of the track border when the SwitchButton is unchecked
disabledCheckedContainerColorContainer or background color when the SwitchButton is disabled and checked
disabledCheckedContentColorColor of content like label when the SwitchButton is disabled and checked
disabledCheckedSecondaryContentColorColor of the secondary content like secondary label when the SwitchButton is disabled and checked
disabledCheckedIconColorIcon color when the SwitchButton is disabled and checked
disabledCheckedThumbColorThumb color when the SwitchButton is disabled and checked
disabledCheckedThumbIconColorThumb icon color when the SwitchButton is disabled and checked
disabledCheckedTrackColorTrack color when the SwitchButton is disabled and checked
disabledCheckedTrackBorderColorTrack border color when the SwitchButton is disabled and checked
disabledUncheckedContainerColorContainer or background color when the SwitchButton is disabled and unchecked
disabledUncheckedContentColorColor of the content like label when the SwitchButton is disabled and unchecked
disabledUncheckedSecondaryContentColorColor of the secondary content like secondary label when the SwitchButton is disabled and unchecked
disabledUncheckedIconColorIcon color when the SwitchButton is disabled and unchecked
disabledUncheckedThumbColorThumb color when the SwitchButton is disabled and unchecked
disabledUncheckedTrackBorderColorTrack border color when the SwitchButton is disabled and unchecked

Functions

public fun copy(
        checkedContainerColor: Color = this.checkedContainerColor,
        checkedContentColor: Color = this.checkedContentColor,
        checkedSecondaryContentColor: Color = this.checkedSecondaryContentColor,
        checkedIconColor: Color = this.checkedIconColor,
        checkedThumbColor: Color = this.checkedThumbColor,
        checkedThumbIconColor: Color = this.checkedThumbIconColor,
        checkedTrackColor: Color = this.checkedTrackColor,
        checkedTrackBorderColor: Color = this.checkedTrackBorderColor,
        uncheckedContainerColor: Color = this.uncheckedContainerColor,
        uncheckedContentColor: Color = this.uncheckedContentColor,
        uncheckedSecondaryContentColor: Color = this.uncheckedSecondaryContentColor,
        uncheckedIconColor: Color = this.uncheckedIconColor,
        uncheckedThumbColor: Color = this.uncheckedThumbColor,
        uncheckedTrackColor: Color = this.uncheckedTrackColor,
        uncheckedTrackBorderColor: Color = this.uncheckedTrackBorderColor,
        disabledCheckedContainerColor: Color = this.disabledCheckedContainerColor,
        disabledCheckedContentColor: Color = this.disabledCheckedContentColor,
        disabledCheckedSecondaryContentColor: Color = this.disabledCheckedSecondaryContentColor,
        disabledCheckedIconColor: Color = this.disabledCheckedIconColor,
        disabledCheckedThumbColor: Color = this.disabledCheckedThumbColor,
        disabledCheckedThumbIconColor: Color = this.disabledCheckedThumbIconColor,
        disabledCheckedTrackColor: Color = this.disabledCheckedTrackColor,
        disabledCheckedTrackBorderColor: Color = this.disabledCheckedTrackBorderColor,
        disabledUncheckedContainerColor: Color = this.disabledUncheckedContainerColor,
        disabledUncheckedContentColor: Color = this.disabledUncheckedContentColor,
        disabledUncheckedSecondaryContentColor: Color = this.disabledUncheckedSecondaryContentColor,
        disabledUncheckedIconColor: Color = this.disabledUncheckedIconColor,
        disabledUncheckedThumbColor: Color = this.disabledUncheckedThumbColor,
        disabledUncheckedTrackBorderColor: Color = this.disabledUncheckedTrackBorderColor,
    ): SwitchButtonColors

Returns a copy of this SwitchButtonColors optionally overriding some of the values.

Parameters

checkedContainerColorContainer or background color when the SwitchButton is checked
checkedContentColorColor of the content like label when the SwitchButton is checked
checkedSecondaryContentColorColor of the secondary content like secondary label when the SwitchButton is checked
checkedIconColorColor of the icon when the SwitchButton is checked
checkedThumbColorColor of the thumb when the SwitchButton is checked
checkedThumbIconColorColor of the thumb icon when the SwitchButton is checked
checkedTrackColorColor of the track when the SwitchButton is checked
checkedTrackBorderColorColor of the track boarder when the SwitchButton is checked
uncheckedContainerColorContainer or background color when the SwitchButton is unchecked
uncheckedContentColorColor of the content like label when the SwitchButton is unchecked
uncheckedSecondaryContentColorColor of the secondary content like secondary label when the SwitchButton is unchecked
uncheckedIconColorColor of the icon when the SwitchButton is unchecked
uncheckedThumbColorColor of the thumb when the SwitchButton is unchecked
uncheckedTrackColorColor of the track when the SwitchButton is unchecked
uncheckedTrackBorderColorColor of the track border when the SwitchButton is unchecked
disabledCheckedContainerColorContainer or background color when the SwitchButton is disabled and checked
disabledCheckedContentColorColor of content like label when the SwitchButton is disabled and checked
disabledCheckedSecondaryContentColorColor of the secondary content like secondary label when the SwitchButton is disabled and checked
disabledCheckedIconColorIcon color when the SwitchButton is disabled and checked
disabledCheckedThumbColorThumb color when the SwitchButton is disabled and checked
disabledCheckedThumbIconColorThumb icon color when the SwitchButton is disabled and checked
disabledCheckedTrackColorTrack color when the SwitchButton is disabled and checked
disabledCheckedTrackBorderColorTrack border color when the SwitchButton is disabled and checked
disabledUncheckedContainerColorContainer or background color when the SwitchButton is disabled and unchecked
disabledUncheckedContentColorColor of the content like label when the SwitchButton is disabled and unchecked
disabledUncheckedSecondaryContentColorColor of the secondary content like secondary label when the SwitchButton is disabled and unchecked
disabledUncheckedIconColorIcon color when the SwitchButton is disabled and unchecked
disabledUncheckedThumbColorThumb color when the SwitchButton is disabled and unchecked
disabledUncheckedTrackBorderColorTrack border color when the SwitchButton is disabled and unchecked