ButtonColors
Class
Android
public class ButtonColors(
public val containerColor: Color,
public val contentColor: Color,
public val secondaryContentColor: Color,
public val iconColor: Color,
public val disabledContainerColor: Color,
public val disabledContentColor: Color,
public val disabledSecondaryContentColor: Color,
public val disabledIconColor: Color,
)
Represents the container and content colors used in buttons in different states.
Parameters
containerColor | The background color of this Button when enabled (overridden by the containerPainter parameter on Buttons with image backgrounds). |
contentColor | The content color of this Button when enabled. |
secondaryContentColor | The content color of this Button when enabled. |
iconColor | The content color of this Button when enabled. |
disabledContainerColor | The background color of this Button when not enabled (overridden by the disabledContainerPainter parameter on Buttons with image backgrounds) |
disabledContentColor | The content color of this Button when not enabled. |
disabledSecondaryContentColor | The content color of this Button when not enabled. |
disabledIconColor | The content color of this Button when not enabled. |
Functions
public fun copy(
containerColor: Color = Color.Unspecified,
contentColor: Color = Color.Unspecified,
secondaryContentColor: Color = Color.Unspecified,
iconColor: Color = Color.Unspecified,
disabledContainerColor: Color = Color.Unspecified,
disabledContentColor: Color = Color.Unspecified,
disabledSecondaryContentColor: Color = Color.Unspecified,
disabledIconColor: Color = Color.Unspecified,
): ButtonColors
Returns a copy of this ButtonColors
, optionally overriding some of the values.
Parameters
containerColor | The background color of this Button when enabled |
contentColor | The content color of this Button when enabled |
secondaryContentColor | The content color of this Button when enabled |
iconColor | The content color of this Button when enabled |
disabledContainerColor | The background color of this Button when not enabled |
disabledContentColor | The content color of this Button when not enabled |
disabledSecondaryContentColor | The content color of this Button when not enabled |
disabledIconColor | The content color of this Button when not enabled |