TextToggleButtonColors

Class

Android
public class TextToggleButtonColors(
    public val checkedContainerColor: Color,
    public val checkedContentColor: Color,
    public val uncheckedContainerColor: Color,
    public val uncheckedContentColor: Color,
    public val disabledCheckedContainerColor: Color,
    public val disabledCheckedContentColor: Color,
    public val disabledUncheckedContainerColor: Color,
    public val disabledUncheckedContentColor: Color,
)

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

Parameters

checkedContainerColorContainer or background color when the toggle button is checked
checkedContentColorColor of the content (text) when the toggle button is checked
uncheckedContainerColorContainer or background color when the toggle button is unchecked
uncheckedContentColorColor of the content (text) when the toggle button is unchecked
disabledCheckedContainerColorContainer or background color when the toggle button is disabled and checked
disabledCheckedContentColorColor of content (text) when the toggle button is disabled and checked
disabledUncheckedContainerColorContainer or background color when the toggle button is disabled and unchecked
disabledUncheckedContentColorColor of the content (text) when the toggle button is disabled and unchecked

Functions

public fun copy(
        checkedContainerColor: Color = this.checkedContainerColor,
        checkedContentColor: Color = this.checkedContentColor,
        uncheckedContainerColor: Color = this.uncheckedContainerColor,
        uncheckedContentColor: Color = this.uncheckedContentColor,
        disabledCheckedContainerColor: Color = this.disabledCheckedContainerColor,
        disabledCheckedContentColor: Color = this.disabledCheckedContentColor,
        disabledUncheckedContainerColor: Color = this.disabledUncheckedContainerColor,
        disabledUncheckedContentColor: Color = this.disabledUncheckedContentColor,
    ): TextToggleButtonColors

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

Parameters

checkedContainerColorContainer or background color when the toggle button is checked
checkedContentColorColor of the content (text or icon) when the toggle button is checked
uncheckedContainerColorContainer or background color when the toggle button is unchecked
uncheckedContentColorColor of the content (text or icon) when the toggle button is unchecked
disabledCheckedContainerColorContainer or background color when the toggle button is disabled and checked
disabledCheckedContentColorColor of content (text or icon) when the toggle button is disabled and checked
disabledUncheckedContainerColorContainer or background color when the toggle button is disabled and unchecked
disabledUncheckedContentColorColor of the content (text or icon) when the toggle button is disabled and unchecked