SwitchColors


Represents the colors used by a Switch in different states

Summary

Public constructors

SwitchColors(
    checkedThumbColor: Color,
    checkedTrackColor: Color,
    checkedBorderColor: Color,
    checkedIconColor: Color,
    uncheckedThumbColor: Color,
    uncheckedTrackColor: Color,
    uncheckedBorderColor: Color,
    uncheckedIconColor: Color,
    disabledCheckedThumbColor: Color,
    disabledCheckedTrackColor: Color,
    disabledCheckedBorderColor: Color,
    disabledCheckedIconColor: Color,
    disabledUncheckedThumbColor: Color,
    disabledUncheckedTrackColor: Color,
    disabledUncheckedBorderColor: Color,
    disabledUncheckedIconColor: Color
)

create an instance with arbitrary colors.

Cmn

Public functions

SwitchColors
copy(
    checkedThumbColor: Color,
    checkedTrackColor: Color,
    checkedBorderColor: Color,
    checkedIconColor: Color,
    uncheckedThumbColor: Color,
    uncheckedTrackColor: Color,
    uncheckedBorderColor: Color,
    uncheckedIconColor: Color,
    disabledCheckedThumbColor: Color,
    disabledCheckedTrackColor: Color,
    disabledCheckedBorderColor: Color,
    disabledCheckedIconColor: Color,
    disabledUncheckedThumbColor: Color,
    disabledUncheckedTrackColor: Color,
    disabledUncheckedBorderColor: Color,
    disabledUncheckedIconColor: Color
)

Returns a copy of this SwitchColors, optionally overriding some of the values.

Cmn
open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn

Public properties

Color

the color used for the border when enabled and checked

Cmn
Color

the color used for the icon when enabled and checked

Cmn
Color

the color used for the thumb when enabled and checked

Cmn
Color

the color used for the track when enabled and checked

Cmn
Color

the color used for the border when disabled and checked

Cmn
Color

the color used for the icon when disabled and checked

Cmn
Color

the color used for the thumb when disabled and checked

Cmn
Color

the color used for the track when disabled and checked

Cmn
Color

the color used for the border when disabled and unchecked

Cmn
Color

the color used for the icon when disabled and unchecked

Cmn
Color

the color used for the thumb when disabled and unchecked

Cmn
Color

the color used for the track when disabled and unchecked

Cmn
Color

the color used for the border when enabled and unchecked

Cmn
Color

the color used for the icon when enabled and unchecked

Cmn
Color

the color used for the thumb when enabled and unchecked

Cmn
Color

the color used for the track when enabled and unchecked

Cmn

Public constructors

SwitchColors

SwitchColors(
    checkedThumbColor: Color,
    checkedTrackColor: Color,
    checkedBorderColor: Color,
    checkedIconColor: Color,
    uncheckedThumbColor: Color,
    uncheckedTrackColor: Color,
    uncheckedBorderColor: Color,
    uncheckedIconColor: Color,
    disabledCheckedThumbColor: Color,
    disabledCheckedTrackColor: Color,
    disabledCheckedBorderColor: Color,
    disabledCheckedIconColor: Color,
    disabledUncheckedThumbColor: Color,
    disabledUncheckedTrackColor: Color,
    disabledUncheckedBorderColor: Color,
    disabledUncheckedIconColor: Color
)

create an instance with arbitrary colors. See SwitchDefaults.colors for the default implementation that follows Material specifications.

Parameters
checkedThumbColor: Color

the color used for the thumb when enabled and checked

checkedTrackColor: Color

the color used for the track when enabled and checked

checkedBorderColor: Color

the color used for the border when enabled and checked

checkedIconColor: Color

the color used for the icon when enabled and checked

uncheckedThumbColor: Color

the color used for the thumb when enabled and unchecked

uncheckedTrackColor: Color

the color used for the track when enabled and unchecked

uncheckedBorderColor: Color

the color used for the border when enabled and unchecked

uncheckedIconColor: Color

the color used for the icon when enabled and unchecked

disabledCheckedThumbColor: Color

the color used for the thumb when disabled and checked

disabledCheckedTrackColor: Color

the color used for the track when disabled and checked

disabledCheckedBorderColor: Color

the color used for the border when disabled and checked

disabledCheckedIconColor: Color

the color used for the icon when disabled and checked

disabledUncheckedThumbColor: Color

the color used for the thumb when disabled and unchecked

disabledUncheckedTrackColor: Color

the color used for the track when disabled and unchecked

disabledUncheckedBorderColor: Color

the color used for the border when disabled and unchecked

disabledUncheckedIconColor: Color

the color used for the icon when disabled and unchecked

Public functions

copy

fun copy(
    checkedThumbColor: Color = this.checkedThumbColor,
    checkedTrackColor: Color = this.checkedTrackColor,
    checkedBorderColor: Color = this.checkedBorderColor,
    checkedIconColor: Color = this.checkedIconColor,
    uncheckedThumbColor: Color = this.uncheckedThumbColor,
    uncheckedTrackColor: Color = this.uncheckedTrackColor,
    uncheckedBorderColor: Color = this.uncheckedBorderColor,
    uncheckedIconColor: Color = this.uncheckedIconColor,
    disabledCheckedThumbColor: Color = this.disabledCheckedThumbColor,
    disabledCheckedTrackColor: Color = this.disabledCheckedTrackColor,
    disabledCheckedBorderColor: Color = this.disabledCheckedBorderColor,
    disabledCheckedIconColor: Color = this.disabledCheckedIconColor,
    disabledUncheckedThumbColor: Color = this.disabledUncheckedThumbColor,
    disabledUncheckedTrackColor: Color = this.disabledUncheckedTrackColor,
    disabledUncheckedBorderColor: Color = this.disabledUncheckedBorderColor,
    disabledUncheckedIconColor: Color = this.disabledUncheckedIconColor
): SwitchColors

Returns a copy of this SwitchColors, optionally overriding some of the values. This uses the Color.Unspecified to mean “use the value from the source”

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

Public properties

checkedBorderColor

val checkedBorderColorColor

the color used for the border when enabled and checked

checkedIconColor

val checkedIconColorColor

the color used for the icon when enabled and checked

checkedThumbColor

val checkedThumbColorColor

the color used for the thumb when enabled and checked

checkedTrackColor

val checkedTrackColorColor

the color used for the track when enabled and checked

disabledCheckedBorderColor

val disabledCheckedBorderColorColor

the color used for the border when disabled and checked

disabledCheckedIconColor

val disabledCheckedIconColorColor

the color used for the icon when disabled and checked

disabledCheckedThumbColor

val disabledCheckedThumbColorColor

the color used for the thumb when disabled and checked

disabledCheckedTrackColor

val disabledCheckedTrackColorColor

the color used for the track when disabled and checked

disabledUncheckedBorderColor

val disabledUncheckedBorderColorColor

the color used for the border when disabled and unchecked

disabledUncheckedIconColor

val disabledUncheckedIconColorColor

the color used for the icon when disabled and unchecked

disabledUncheckedThumbColor

val disabledUncheckedThumbColorColor

the color used for the thumb when disabled and unchecked

disabledUncheckedTrackColor

val disabledUncheckedTrackColorColor

the color used for the track when disabled and unchecked

uncheckedBorderColor

val uncheckedBorderColorColor

the color used for the border when enabled and unchecked

uncheckedIconColor

val uncheckedIconColorColor

the color used for the icon when enabled and unchecked

uncheckedThumbColor

val uncheckedThumbColorColor

the color used for the thumb when enabled and unchecked

uncheckedTrackColor

val uncheckedTrackColorColor

the color used for the track when enabled and unchecked