public final class ButtonColors


Represents the container and content colors used in buttons, such as textEdgeButton or iconEdgeButton.

Summary

Public constructors

ButtonColors(
    @NonNull LayoutColor containerColor,
    @NonNull LayoutColor iconColor,
    @NonNull LayoutColor labelColor,
    @NonNull LayoutColor secondaryLabelColor
)

Public methods

final @NonNull ButtonColors
copy(
    @NonNull LayoutColor containerColor,
    @NonNull LayoutColor iconColor,
    @NonNull LayoutColor labelColor,
    @NonNull LayoutColor secondaryLabelColor
)

Returns a copy of this androidx.wear.protolayout.material3.ButtonColors, optionally overriding some of the values.

final @NonNull LayoutColor

The container color to be used for a button's background.

final @NonNull LayoutColor

The icon tint color to be used for a button.

final @NonNull LayoutColor

The label color to be used for a button.

final @NonNull LayoutColor

The secondary label color to be used for a button.

Public constructors

ButtonColors

Added in 1.3.0-alpha09
public ButtonColors(
    @NonNull LayoutColor containerColor,
    @NonNull LayoutColor iconColor,
    @NonNull LayoutColor labelColor,
    @NonNull LayoutColor secondaryLabelColor
)
Parameters
@NonNull LayoutColor containerColor

The container color to be used for a button's background.

@NonNull LayoutColor iconColor

The icon tint color to be used for a button.

@NonNull LayoutColor labelColor

The label color to be used for a button.

@NonNull LayoutColor secondaryLabelColor

The secondary label color to be used for a button.

Public methods

copy

Added in 1.3.0-alpha09
public final @NonNull ButtonColors copy(
    @NonNull LayoutColor containerColor,
    @NonNull LayoutColor iconColor,
    @NonNull LayoutColor labelColor,
    @NonNull LayoutColor secondaryLabelColor
)

Returns a copy of this androidx.wear.protolayout.material3.ButtonColors, optionally overriding some of the values.

Parameters
@NonNull LayoutColor containerColor

The container color to be used for a button's background.

@NonNull LayoutColor iconColor

The icon tint color to be used for a button.

@NonNull LayoutColor labelColor

The label color to be used for a button.

@NonNull LayoutColor secondaryLabelColor

The secondary label color to be used for a button.

getContainerColor

Added in 1.3.0-alpha09
public final @NonNull LayoutColor getContainerColor()

The container color to be used for a button's background.

getIconColor

Added in 1.3.0-alpha09
public final @NonNull LayoutColor getIconColor()

The icon tint color to be used for a button.

getLabelColor

Added in 1.3.0-alpha09
public final @NonNull LayoutColor getLabelColor()

The label color to be used for a button.

getSecondaryLabelColor

Added in 1.3.0-alpha09
public final @NonNull LayoutColor getSecondaryLabelColor()

The secondary label color to be used for a button.