class ButtonColors


Represents the container and content colors used in buttons in different states.

Summary

Public constructors

ButtonColors(
    containerColor: Color,
    contentColor: Color,
    secondaryContentColor: Color,
    iconColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    disabledSecondaryContentColor: Color,
    disabledIconColor: Color
)

Creates a ButtonColors where all of the values are explicitly defined.

ButtonColors(
    containerPainter: Painter,
    contentColor: Color,
    secondaryContentColor: Color,
    iconColor: Color,
    disabledContainerPainter: Painter,
    disabledContentColor: Color,
    disabledSecondaryContentColor: Color,
    disabledIconColor: Color
)

Public functions

ButtonColors
copy(
    containerColor: Color,
    contentColor: Color,
    secondaryContentColor: Color,
    iconColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    disabledSecondaryContentColor: Color,
    disabledIconColor: Color
)

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

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

Public properties

Painter

Painter to use to draw the background of the Button when enabled.

Color

The content color of this Button when enabled.

Painter

Painter to use to draw the background of the Button when not enabled.

Color

The content color of this Button when not enabled.

Color

The content color of this Button when not enabled.

Color

The content color of this Button when not enabled.

Color

The content color of this Button when enabled.

Color

The content color of this Button when enabled.

Public constructors

ButtonColors

ButtonColors(
    containerColor: Color,
    contentColor: Color,
    secondaryContentColor: Color,
    iconColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    disabledSecondaryContentColor: Color,
    disabledIconColor: Color
)

Creates a ButtonColors where all of the values are explicitly defined.

Parameters
containerColor: Color

The background color of this Button when enabled

contentColor: Color

The content color of this Button when enabled

secondaryContentColor: Color

The content color of this Button when enabled

iconColor: Color

The content color of this Button when enabled

disabledContainerColor: Color

The background color of this Button when not enabled

disabledContentColor: Color

The content color of this Button when not enabled

disabledSecondaryContentColor: Color

The content color of this Button when not enabled

disabledIconColor: Color

The content color of this Button when not enabled

ButtonColors

ButtonColors(
    containerPainter: Painter,
    contentColor: Color,
    secondaryContentColor: Color,
    iconColor: Color,
    disabledContainerPainter: Painter,
    disabledContentColor: Color,
    disabledSecondaryContentColor: Color,
    disabledIconColor: Color
)
Parameters
containerPainter: Painter

Painter to use to draw the background of the Button when enabled.

contentColor: Color

The content color of this Button when enabled.

secondaryContentColor: Color

The content color of this Button when enabled.

iconColor: Color

The content color of this Button when enabled.

disabledContainerPainter: Painter

Painter to use to draw the background of the Button when not enabled.

disabledContentColor: Color

The content color of this Button when not enabled.

disabledSecondaryContentColor: Color

The content color of this Button when not enabled.

disabledIconColor: Color

The content color of this Button when not enabled.

Public functions

copy

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: Color = Color.Unspecified

The background color of this Button when enabled

contentColor: Color = Color.Unspecified

The content color of this Button when enabled

secondaryContentColor: Color = Color.Unspecified

The content color of this Button when enabled

iconColor: Color = Color.Unspecified

The content color of this Button when enabled

disabledContainerColor: Color = Color.Unspecified

The background color of this Button when not enabled

disabledContentColor: Color = Color.Unspecified

The content color of this Button when not enabled

disabledSecondaryContentColor: Color = Color.Unspecified

The content color of this Button when not enabled

disabledIconColor: Color = Color.Unspecified

The content color of this Button when not enabled

equals

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

hashCode

open fun hashCode(): Int

Public properties

containerPainter

Added in 1.0.0-alpha30
val containerPainterPainter

Painter to use to draw the background of the Button when enabled.

contentColor

Added in 1.0.0-alpha30
val contentColorColor

The content color of this Button when enabled.

disabledContainerPainter

Added in 1.0.0-alpha30
val disabledContainerPainterPainter

Painter to use to draw the background of the Button when not enabled.

disabledContentColor

Added in 1.0.0-alpha30
val disabledContentColorColor

The content color of this Button when not enabled.

disabledIconColor

Added in 1.0.0-alpha30
val disabledIconColorColor

The content color of this Button when not enabled.

disabledSecondaryContentColor

Added in 1.0.0-alpha30
val disabledSecondaryContentColorColor

The content color of this Button when not enabled.

iconColor

Added in 1.0.0-alpha30
val iconColorColor

The content color of this Button when enabled.

secondaryContentColor

Added in 1.0.0-alpha30
val secondaryContentColorColor

The content color of this Button when enabled.