{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

RadioButtonColors

public final class RadioButtonColors


Represents the color used by a RadioButton in different states.

Summary

Public constructors

RadioButtonColors(
    @NonNull Color selectedColor,
    @NonNull Color unselectedColor,
    @NonNull Color disabledSelectedColor,
    @NonNull Color disabledUnselectedColor
)

create an instance with arbitrary colors.

Public methods

final @NonNull RadioButtonColors
copy(
    @NonNull Color selectedColor,
    @NonNull Color unselectedColor,
    @NonNull Color disabledSelectedColor,
    @NonNull Color disabledUnselectedColor
)

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

boolean
equals(Object other)
final @NonNull Color

the color to use for the RadioButton when disabled and selected.

final @NonNull Color

the color to use for the RadioButton when disabled and not selected.

final @NonNull Color

the color to use for the RadioButton when selected and enabled.

final @NonNull Color

the color to use for the RadioButton when unselected and enabled.

int

Public constructors

RadioButtonColors

public RadioButtonColors(
    @NonNull Color selectedColor,
    @NonNull Color unselectedColor,
    @NonNull Color disabledSelectedColor,
    @NonNull Color disabledUnselectedColor
)

create an instance with arbitrary colors. See RadioButtonDefaults.colors for the default implementation that follows Material specifications.

Parameters
@NonNull Color selectedColor

the color to use for the RadioButton when selected and enabled.

@NonNull Color unselectedColor

the color to use for the RadioButton when unselected and enabled.

@NonNull Color disabledSelectedColor

the color to use for the RadioButton when disabled and selected.

@NonNull Color disabledUnselectedColor

the color to use for the RadioButton when disabled and not selected.

Public methods

copy

public final @NonNull RadioButtonColors copy(
    @NonNull Color selectedColor,
    @NonNull Color unselectedColor,
    @NonNull Color disabledSelectedColor,
    @NonNull Color disabledUnselectedColor
)

Returns a copy of this SelectableChipColors, optionally overriding some of the values. This uses the Color.Unspecified to mean “use the value from the source”

equals

public boolean equals(Object other)

getDisabledSelectedColor

public final @NonNull Color getDisabledSelectedColor()

the color to use for the RadioButton when disabled and selected.

getDisabledUnselectedColor

public final @NonNull Color getDisabledUnselectedColor()

the color to use for the RadioButton when disabled and not selected.

getSelectedColor

public final @NonNull Color getSelectedColor()

the color to use for the RadioButton when selected and enabled.

getUnselectedColor

public final @NonNull Color getUnselectedColor()

the color to use for the RadioButton when unselected and enabled.

hashCode

public int hashCode()