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

FilterChipDefaults

public static class FilterChipDefaults


Contains the baseline values used by FilterChip.

Summary

Public fields

static @NonNull FilterChipDefaults

Public methods

final @NonNull SelectableChipColors

Creates a SelectableChipColors that represents the default container and content colors used in an elevated FilterChip.

final @NonNull SelectableChipColors
@Composable
elevatedFilterChipColors(
    @NonNull Color containerColor,
    @NonNull Color labelColor,
    @NonNull Color iconColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledLabelColor,
    @NonNull Color disabledLeadingIconColor,
    @NonNull Color disabledTrailingIconColor,
    @NonNull Color selectedContainerColor,
    @NonNull Color disabledSelectedContainerColor,
    @NonNull Color selectedLabelColor,
    @NonNull Color selectedLeadingIconColor,
    @NonNull Color selectedTrailingIconColor
)

Creates a SelectableChipColors that represents the default container and content colors used in an elevated FilterChip.

final @NonNull SelectableChipElevation
@Composable
elevatedFilterChipElevation(
    @NonNull Dp elevation,
    @NonNull Dp pressedElevation,
    @NonNull Dp focusedElevation,
    @NonNull Dp hoveredElevation,
    @NonNull Dp draggedElevation,
    @NonNull Dp disabledElevation
)

Creates a SelectableChipElevation that will animate between the provided values according to the Material specification for an elevated FilterChip.

final @NonNull BorderStroke
@Composable
filterChipBorder(
    boolean enabled,
    boolean selected,
    @NonNull Color borderColor,
    @NonNull Color selectedBorderColor,
    @NonNull Color disabledBorderColor,
    @NonNull Color disabledSelectedBorderColor,
    @NonNull Dp borderWidth,
    @NonNull Dp selectedBorderWidth
)

Creates a BorderStroke that represents the default border used in a flat FilterChip.

final @NonNull SelectableChipColors

Creates a SelectableChipColors that represents the default container and content colors used in a flat FilterChip.

final @NonNull SelectableChipColors
@Composable
filterChipColors(
    @NonNull Color containerColor,
    @NonNull Color labelColor,
    @NonNull Color iconColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledLabelColor,
    @NonNull Color disabledLeadingIconColor,
    @NonNull Color disabledTrailingIconColor,
    @NonNull Color selectedContainerColor,
    @NonNull Color disabledSelectedContainerColor,
    @NonNull Color selectedLabelColor,
    @NonNull Color selectedLeadingIconColor,
    @NonNull Color selectedTrailingIconColor
)

Creates a SelectableChipColors that represents the default container and content colors used in a flat FilterChip.

final @NonNull SelectableChipElevation
@Composable
filterChipElevation(
    @NonNull Dp elevation,
    @NonNull Dp pressedElevation,
    @NonNull Dp focusedElevation,
    @NonNull Dp hoveredElevation,
    @NonNull Dp draggedElevation,
    @NonNull Dp disabledElevation
)

Creates a SelectableChipElevation that will animate between the provided values according to the Material specification for a flat FilterChip.

final @NonNull Dp

The height applied for a filter chip.

final @NonNull Dp

The size of a filter chip leading icon.

final @NonNull Shape

Default shape of a filter chip.

Public fields

INSTANCE

public static @NonNull FilterChipDefaults INSTANCE

Public methods

elevatedFilterChipColors

@Composable
public final @NonNull SelectableChipColors elevatedFilterChipColors()

Creates a SelectableChipColors that represents the default container and content colors used in an elevated FilterChip.

elevatedFilterChipColors

@Composable
public final @NonNull SelectableChipColors elevatedFilterChipColors(
    @NonNull Color containerColor,
    @NonNull Color labelColor,
    @NonNull Color iconColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledLabelColor,
    @NonNull Color disabledLeadingIconColor,
    @NonNull Color disabledTrailingIconColor,
    @NonNull Color selectedContainerColor,
    @NonNull Color disabledSelectedContainerColor,
    @NonNull Color selectedLabelColor,
    @NonNull Color selectedLeadingIconColor,
    @NonNull Color selectedTrailingIconColor
)

Creates a SelectableChipColors that represents the default container and content colors used in an elevated FilterChip.

Parameters
@NonNull Color containerColor

the container color of this chip when enabled

@NonNull Color labelColor

the label color of this chip when enabled

@NonNull Color iconColor

the color of this chip's start and end icons when enabled

@NonNull Color disabledContainerColor

the container color of this chip when not enabled

@NonNull Color disabledLabelColor

the label color of this chip when not enabled

@NonNull Color disabledLeadingIconColor

the color of this chip's start icon when not enabled

@NonNull Color disabledTrailingIconColor

the color of this chip's end icon when not enabled

@NonNull Color selectedContainerColor

the container color of this chip when selected

@NonNull Color disabledSelectedContainerColor

the container color of this chip when not enabled and selected

@NonNull Color selectedLabelColor

the label color of this chip when selected

@NonNull Color selectedLeadingIconColor

the color of this chip's start icon when selected

@NonNull Color selectedTrailingIconColor

the color of this chip's end icon when selected

elevatedFilterChipElevation

@Composable
public final @NonNull SelectableChipElevation elevatedFilterChipElevation(
    @NonNull Dp elevation,
    @NonNull Dp pressedElevation,
    @NonNull Dp focusedElevation,
    @NonNull Dp hoveredElevation,
    @NonNull Dp draggedElevation,
    @NonNull Dp disabledElevation
)

Creates a SelectableChipElevation that will animate between the provided values according to the Material specification for an elevated FilterChip.

Parameters
@NonNull Dp elevation

the elevation used when the chip is has no other Interactions

@NonNull Dp pressedElevation

the elevation used when the chip is pressed

@NonNull Dp focusedElevation

the elevation used when the chip is focused

@NonNull Dp hoveredElevation

the elevation used when the chip is hovered

@NonNull Dp draggedElevation

the elevation used when the chip is dragged

@NonNull Dp disabledElevation

the elevation used when the chip is not enabled

filterChipBorder

@Composable
public final @NonNull BorderStroke filterChipBorder(
    boolean enabled,
    boolean selected,
    @NonNull Color borderColor,
    @NonNull Color selectedBorderColor,
    @NonNull Color disabledBorderColor,
    @NonNull Color disabledSelectedBorderColor,
    @NonNull Dp borderWidth,
    @NonNull Dp selectedBorderWidth
)

Creates a BorderStroke that represents the default border used in a flat FilterChip.

Parameters
boolean enabled

controls the enabled state of this chip. When false, this component will not respond to user input, and it will appear visually disabled and disabled to accessibility services.

boolean selected

whether this chip is selected or not

@NonNull Color borderColor

the border color of this chip when enabled and not selected

@NonNull Color selectedBorderColor

the border color of this chip when enabled and selected

@NonNull Color disabledBorderColor

the border color of this chip when not enabled and not selected

@NonNull Color disabledSelectedBorderColor

the border color of this chip when not enabled but selected

@NonNull Dp borderWidth

the border stroke width of this chip when not selected

@NonNull Dp selectedBorderWidth

the border stroke width of this chip when selected

filterChipColors

@Composable
public final @NonNull SelectableChipColors filterChipColors()

Creates a SelectableChipColors that represents the default container and content colors used in a flat FilterChip.

filterChipColors

@Composable
public final @NonNull SelectableChipColors filterChipColors(
    @NonNull Color containerColor,
    @NonNull Color labelColor,
    @NonNull Color iconColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledLabelColor,
    @NonNull Color disabledLeadingIconColor,
    @NonNull Color disabledTrailingIconColor,
    @NonNull Color selectedContainerColor,
    @NonNull Color disabledSelectedContainerColor,
    @NonNull Color selectedLabelColor,
    @NonNull Color selectedLeadingIconColor,
    @NonNull Color selectedTrailingIconColor
)

Creates a SelectableChipColors that represents the default container and content colors used in a flat FilterChip.

Parameters
@NonNull Color containerColor

the container color of this chip when enabled

@NonNull Color labelColor

the label color of this chip when enabled

@NonNull Color iconColor

the color of this chip's start and end icons when enabled

@NonNull Color disabledContainerColor

the container color of this chip when not enabled

@NonNull Color disabledLabelColor

the label color of this chip when not enabled

@NonNull Color disabledLeadingIconColor

the color of this chip's start icon when not enabled

@NonNull Color disabledTrailingIconColor

the color of this chip's end icon when not enabled

@NonNull Color selectedContainerColor

the container color of this chip when selected

@NonNull Color disabledSelectedContainerColor

the container color of this chip when not enabled and selected

@NonNull Color selectedLabelColor

the label color of this chip when selected

@NonNull Color selectedLeadingIconColor

the color of this chip's start icon when selected

@NonNull Color selectedTrailingIconColor

the color of this chip's end icon when selected

filterChipElevation

@Composable
public final @NonNull SelectableChipElevation filterChipElevation(
    @NonNull Dp elevation,
    @NonNull Dp pressedElevation,
    @NonNull Dp focusedElevation,
    @NonNull Dp hoveredElevation,
    @NonNull Dp draggedElevation,
    @NonNull Dp disabledElevation
)

Creates a SelectableChipElevation that will animate between the provided values according to the Material specification for a flat FilterChip.

Parameters
@NonNull Dp elevation

the elevation used when the FilterChip is has no other Interactions

@NonNull Dp pressedElevation

the elevation used when the chip is pressed

@NonNull Dp focusedElevation

the elevation used when the chip is focused

@NonNull Dp hoveredElevation

the elevation used when the chip is hovered

@NonNull Dp draggedElevation

the elevation used when the chip is dragged

@NonNull Dp disabledElevation

the elevation used when the chip is not enabled

getHeight

public final @NonNull Dp getHeight()

The height applied for a filter chip. Note that you can override it by applying Modifier.height directly on a chip.

getIconSize

public final @NonNull Dp getIconSize()

The size of a filter chip leading icon.

getShape

@Composable
public final @NonNull Shape getShape()

Default shape of a filter chip.