SwitchColors
-
Cmn
class SwitchColors
Represents the colors used by a Switch in different states
Summary
Public constructors |
|
|---|---|
SwitchColors(create an instance with arbitrary colors. |
Cmn
|
Public functions |
||
|---|---|---|
SwitchColors |
copy(Returns a copy of this SwitchColors, optionally overriding some of the values. |
Cmn
|
open operator Boolean |
Cmn
|
|
open Int |
hashCode() |
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”
Public properties
checkedBorderColor
val checkedBorderColor: Color
the color used for the border when enabled and checked
checkedThumbColor
val checkedThumbColor: Color
the color used for the thumb when enabled and checked
checkedTrackColor
val checkedTrackColor: Color
the color used for the track when enabled and checked
disabledCheckedBorderColor
val disabledCheckedBorderColor: Color
the color used for the border when disabled and checked
disabledCheckedIconColor
val disabledCheckedIconColor: Color
the color used for the icon when disabled and checked
disabledCheckedThumbColor
val disabledCheckedThumbColor: Color
the color used for the thumb when disabled and checked
disabledCheckedTrackColor
val disabledCheckedTrackColor: Color
the color used for the track when disabled and checked
disabledUncheckedBorderColor
val disabledUncheckedBorderColor: Color
the color used for the border when disabled and unchecked
disabledUncheckedIconColor
val disabledUncheckedIconColor: Color
the color used for the icon when disabled and unchecked
disabledUncheckedThumbColor
val disabledUncheckedThumbColor: Color
the color used for the thumb when disabled and unchecked
disabledUncheckedTrackColor
val disabledUncheckedTrackColor: Color
the color used for the track when disabled and unchecked
uncheckedBorderColor
val uncheckedBorderColor: Color
the color used for the border when enabled and unchecked
uncheckedIconColor
val uncheckedIconColor: Color
the color used for the icon when enabled and unchecked
uncheckedThumbColor
val uncheckedThumbColor: Color
the color used for the thumb when enabled and unchecked
uncheckedTrackColor
val uncheckedTrackColor: Color
the color used for the track when enabled and unchecked