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

CheckboxDefaults

public static class CheckboxDefaults


Defaults used in Checkbox and TriStateCheckbox.

Summary

Public fields

static @NonNull CheckboxDefaults

Public methods

final @NonNull CheckboxColors

Creates a CheckboxColors that will animate between the provided colors according to the Material specification.

final @NonNull CheckboxColors
@Composable
colors(
    @NonNull Color checkedColor,
    @NonNull Color uncheckedColor,
    @NonNull Color checkmarkColor,
    @NonNull Color disabledCheckedColor,
    @NonNull Color disabledUncheckedColor,
    @NonNull Color disabledIndeterminateColor
)

Creates a CheckboxColors that will animate between the provided colors according to the Material specification.

Public fields

INSTANCE

public static @NonNull CheckboxDefaults INSTANCE

Public methods

colors

@Composable
public final @NonNull CheckboxColors colors()

Creates a CheckboxColors that will animate between the provided colors according to the Material specification.

colors

@Composable
public final @NonNull CheckboxColors colors(
    @NonNull Color checkedColor,
    @NonNull Color uncheckedColor,
    @NonNull Color checkmarkColor,
    @NonNull Color disabledCheckedColor,
    @NonNull Color disabledUncheckedColor,
    @NonNull Color disabledIndeterminateColor
)

Creates a CheckboxColors that will animate between the provided colors according to the Material specification.

Parameters
@NonNull Color checkedColor

the color that will be used for the border and box when checked

@NonNull Color uncheckedColor

color that will be used for the border when unchecked. By default, the inner box is transparent when unchecked.

@NonNull Color checkmarkColor

color that will be used for the checkmark when checked

@NonNull Color disabledCheckedColor

color that will be used for the box and border when disabled and checked

@NonNull Color disabledUncheckedColor

color that will be used for the border when disabled and unchecked. By default, the inner box is transparent when unchecked.

@NonNull Color disabledIndeterminateColor

color that will be used for the box and border in a TriStateCheckbox when disabled AND in an ToggleableState.Indeterminate state