ToggleButtonColors
-
Cmn
class ToggleButtonColors
Represents the container and content colors used in a toggle button in different states.
Summary
Public constructors |
|
---|---|
ToggleButtonColors( create an instance with arbitrary colors. |
Cmn
|
Public functions |
||
---|---|---|
ToggleButtonColors |
copy( Returns a copy of this ToggleButtonColors, optionally overriding some of the values. |
Cmn
|
open operator Boolean |
Cmn
|
|
open Int |
hashCode() |
Cmn
|
Public properties |
||
---|---|---|
Color |
the container color of this |
Cmn
|
Color |
the content color of this |
Cmn
|
Color |
the container color of this |
Cmn
|
Color |
the content color of this |
Cmn
|
Color |
the container color of this |
Cmn
|
Color |
the content color of this |
Cmn
|
Public constructors
ToggleButtonColors
ToggleButtonColors(
containerColor: Color,
contentColor: Color,
disabledContainerColor: Color,
disabledContentColor: Color,
checkedContainerColor: Color,
checkedContentColor: Color
)
create an instance with arbitrary colors.
-
See
ToggleButtonDefaults.toggleButtonColors
for the default colors used in aToggleButton
. -
See
ToggleButtonDefaults.elevatedToggleButtonColors
for the default colors used in aElevatedToggleButton
. -
See
ToggleButtonDefaults.tonalToggleButtonColors
for the default colors used in aTonalToggleButton
. -
See
ToggleButtonDefaults.outlinedToggleButtonColors
for the default colors used in aOutlinedToggleButton
.
Parameters | |
---|---|
containerColor: Color |
the container color of this |
contentColor: Color |
the content color of this |
disabledContainerColor: Color |
the container color of this |
disabledContentColor: Color |
the content color of this |
checkedContainerColor: Color |
the container color of this |
checkedContentColor: Color |
the content color of this |
Public functions
copy
fun copy(
containerColor: Color = this.containerColor,
contentColor: Color = this.contentColor,
disabledContainerColor: Color = this.disabledContainerColor,
disabledContentColor: Color = this.disabledContentColor,
checkedContainerColor: Color = this.checkedContainerColor,
checkedContentColor: Color = this.checkedContentColor
): ToggleButtonColors
Returns a copy of this ToggleButtonColors, optionally overriding some of the values. This uses the Color.Unspecified to mean “use the value from the source”
Public properties
checkedContainerColor
val checkedContainerColor: Color
the container color of this ToggleButton
when checked.
checkedContentColor
val checkedContentColor: Color
the content color of this ToggleButton
when checked.
disabledContainerColor
val disabledContainerColor: Color
the container color of this ToggleButton
when not enabled.
disabledContentColor
val disabledContentColor: Color
the content color of this ToggleButton
when not enabled.