ButtonColors
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(Constructor for |
ButtonColors(@ColorInt int backgroundColor, @ColorInt int contentColor)Constructor for |
Public methods |
|
|---|---|
@NonNull ColorBuilders.ColorProp |
The background color to be used on |
@NonNull ColorBuilders.ColorProp |
The content or tint color to be used on |
static @NonNull ButtonColors |
primaryButtonColors(@NonNull Colors colors)Returns a |
static @NonNull ButtonColors |
secondaryButtonColors(@NonNull Colors colors)Returns a |
Public constructors
ButtonColors
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
public ButtonColors(@ColorInt int backgroundColor, @ColorInt int contentColor)
Constructor for ButtonColors object.
Public methods
getBackgroundColor
public @NonNull ColorBuilders.ColorProp getBackgroundColor()
The background color to be used on Button.
getContentColor
public @NonNull ColorBuilders.ColorProp getContentColor()
The content or tint color to be used on Button.
primaryButtonColors
public static @NonNull ButtonColors primaryButtonColors(@NonNull Colors colors)
Returns a ButtonColors object, using the current Primary colors from the given Colors.
secondaryButtonColors
public static @NonNull ButtonColors secondaryButtonColors(@NonNull Colors colors)
Returns a ButtonColors object, using the current Surface colors from the given Colors.