public class ButtonColors


Represents the background and content colors used in Button.

See PRIMARY_COLORS for the default colors used in a primary styled Button. See SECONDARY_COLORS for the default colors used in a secondary styled Button.

Summary

Public constructors

ButtonColors(
    @NonNull ColorBuilders.ColorProp backgroundColor,
    @NonNull ColorBuilders.ColorProp contentColor
)

Constructor for ButtonColors object.

ButtonColors(@ColorInt int backgroundColor, @ColorInt int contentColor)

Constructor for ButtonColors object.

Public methods

@NonNull ColorBuilders.ColorProp

The background color to be used on Button.

@NonNull ColorBuilders.ColorProp

The content or tint color to be used on Button.

static @NonNull ButtonColors

Returns a ButtonColors object, using the current Primary colors from the given .

static @NonNull ButtonColors

Returns a ButtonColors object, using the current Surface colors from the given .

Public constructors

ButtonColors

Added in 1.0.0
public ButtonColors(
    @NonNull ColorBuilders.ColorProp backgroundColor,
    @NonNull ColorBuilders.ColorProp contentColor
)

Constructor for ButtonColors object.

Parameters
@NonNull ColorBuilders.ColorProp backgroundColor

The background color to be used for a button.

@NonNull ColorBuilders.ColorProp contentColor

The content color or tint color to be used for a button.

ButtonColors

Added in 1.0.0
public ButtonColors(@ColorInt int backgroundColor, @ColorInt int contentColor)

Constructor for ButtonColors object.

Parameters
@ColorInt int backgroundColor

The background color to be used for Button. Should be in ARGB format.

@ColorInt int contentColor

The content color or tint color to be used for Button. Should be in ARGB format.

Public methods

getBackgroundColor

Added in 1.0.0
public @NonNull ColorBuilders.ColorProp getBackgroundColor()

The background color to be used on Button.

getContentColor

Added in 1.0.0
public @NonNull ColorBuilders.ColorProp getContentColor()

The content or tint color to be used on Button.

primaryButtonColors

Added in 1.0.0
public static @NonNull ButtonColors primaryButtonColors(@NonNull Colors colors)

Returns a ButtonColors object, using the current Primary colors from the given .

secondaryButtonColors

Added in 1.0.0
public static @NonNull ButtonColors secondaryButtonColors(@NonNull Colors colors)

Returns a ButtonColors object, using the current Surface colors from the given .