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

ExposedDropdownMenuDefaults

@ExperimentalMaterial3Api
public static class ExposedDropdownMenuDefaults


Contains default values used by Exposed Dropdown Menu.

Summary

Public fields

static @NonNull ExposedDropdownMenuDefaults

Public methods

final void

Default trailing icon for Exposed Dropdown Menu.

final @NonNull PaddingValues

Padding for DropdownMenuItems within ExposedDropdownMenuBoxScope.ExposedDropdownMenu to align them properly with TextField components.

final @NonNull TextFieldColors
@Composable
outlinedTextFieldColors(
    @NonNull Color focusedTextColor,
    @NonNull Color unfocusedTextColor,
    @NonNull Color disabledTextColor,
    @NonNull Color errorTextColor,
    @NonNull Color focusedContainerColor,
    @NonNull Color unfocusedContainerColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color errorContainerColor,
    @NonNull Color cursorColor,
    @NonNull Color errorCursorColor,
    @NonNull TextSelectionColors selectionColors,
    @NonNull Color focusedBorderColor,
    @NonNull Color unfocusedBorderColor,
    @NonNull Color disabledBorderColor,
    @NonNull Color errorBorderColor,
    @NonNull Color focusedLeadingIconColor,
    @NonNull Color unfocusedLeadingIconColor,
    @NonNull Color disabledLeadingIconColor,
    @NonNull Color errorLeadingIconColor,
    @NonNull Color focusedTrailingIconColor,
    @NonNull Color unfocusedTrailingIconColor,
    @NonNull Color disabledTrailingIconColor,
    @NonNull Color errorTrailingIconColor,
    @NonNull Color focusedLabelColor,
    @NonNull Color unfocusedLabelColor,
    @NonNull Color disabledLabelColor,
    @NonNull Color errorLabelColor,
    @NonNull Color focusedPlaceholderColor,
    @NonNull Color unfocusedPlaceholderColor,
    @NonNull Color disabledPlaceholderColor,
    @NonNull Color errorPlaceholderColor,
    @NonNull Color focusedPrefixColor,
    @NonNull Color unfocusedPrefixColor,
    @NonNull Color disabledPrefixColor,
    @NonNull Color errorPrefixColor,
    @NonNull Color focusedSuffixColor,
    @NonNull Color unfocusedSuffixColor,
    @NonNull Color disabledSuffixColor,
    @NonNull Color errorSuffixColor
)

Creates a TextFieldColors that represents the default input text, container, and content colors (including label, placeholder, icons, etc.) used in an OutlinedTextField within an ExposedDropdownMenuBox.

final @NonNull TextFieldColors
@Composable
textFieldColors(
    @NonNull Color focusedTextColor,
    @NonNull Color unfocusedTextColor,
    @NonNull Color disabledTextColor,
    @NonNull Color errorTextColor,
    @NonNull Color focusedContainerColor,
    @NonNull Color unfocusedContainerColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color errorContainerColor,
    @NonNull Color cursorColor,
    @NonNull Color errorCursorColor,
    @NonNull TextSelectionColors selectionColors,
    @NonNull Color focusedIndicatorColor,
    @NonNull Color unfocusedIndicatorColor,
    @NonNull Color disabledIndicatorColor,
    @NonNull Color errorIndicatorColor,
    @NonNull Color focusedLeadingIconColor,
    @NonNull Color unfocusedLeadingIconColor,
    @NonNull Color disabledLeadingIconColor,
    @NonNull Color errorLeadingIconColor,
    @NonNull Color focusedTrailingIconColor,
    @NonNull Color unfocusedTrailingIconColor,
    @NonNull Color disabledTrailingIconColor,
    @NonNull Color errorTrailingIconColor,
    @NonNull Color focusedLabelColor,
    @NonNull Color unfocusedLabelColor,
    @NonNull Color disabledLabelColor,
    @NonNull Color errorLabelColor,
    @NonNull Color focusedPlaceholderColor,
    @NonNull Color unfocusedPlaceholderColor,
    @NonNull Color disabledPlaceholderColor,
    @NonNull Color errorPlaceholderColor,
    @NonNull Color focusedPrefixColor,
    @NonNull Color unfocusedPrefixColor,
    @NonNull Color disabledPrefixColor,
    @NonNull Color errorPrefixColor,
    @NonNull Color focusedSuffixColor,
    @NonNull Color unfocusedSuffixColor,
    @NonNull Color disabledSuffixColor,
    @NonNull Color errorSuffixColor
)

Creates a TextFieldColors that represents the default input text, container, and content colors (including label, placeholder, icons, etc.) used in a TextField within an ExposedDropdownMenuBox.

Public fields

INSTANCE

public static @NonNull ExposedDropdownMenuDefaults INSTANCE

Public methods

TrailingIcon

@ExperimentalMaterial3Api
@Composable
public final void TrailingIcon(boolean expanded)

Default trailing icon for Exposed Dropdown Menu.

Parameters
boolean expanded

whether ExposedDropdownMenuBoxScope.ExposedDropdownMenu is expanded or not. Affects the appearance of the icon.

getItemContentPadding

public final @NonNull PaddingValues getItemContentPadding()

Padding for DropdownMenuItems within ExposedDropdownMenuBoxScope.ExposedDropdownMenu to align them properly with TextField components.

outlinedTextFieldColors

@Composable
public final @NonNull TextFieldColors outlinedTextFieldColors(
    @NonNull Color focusedTextColor,
    @NonNull Color unfocusedTextColor,
    @NonNull Color disabledTextColor,
    @NonNull Color errorTextColor,
    @NonNull Color focusedContainerColor,
    @NonNull Color unfocusedContainerColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color errorContainerColor,
    @NonNull Color cursorColor,
    @NonNull Color errorCursorColor,
    @NonNull TextSelectionColors selectionColors,
    @NonNull Color focusedBorderColor,
    @NonNull Color unfocusedBorderColor,
    @NonNull Color disabledBorderColor,
    @NonNull Color errorBorderColor,
    @NonNull Color focusedLeadingIconColor,
    @NonNull Color unfocusedLeadingIconColor,
    @NonNull Color disabledLeadingIconColor,
    @NonNull Color errorLeadingIconColor,
    @NonNull Color focusedTrailingIconColor,
    @NonNull Color unfocusedTrailingIconColor,
    @NonNull Color disabledTrailingIconColor,
    @NonNull Color errorTrailingIconColor,
    @NonNull Color focusedLabelColor,
    @NonNull Color unfocusedLabelColor,
    @NonNull Color disabledLabelColor,
    @NonNull Color errorLabelColor,
    @NonNull Color focusedPlaceholderColor,
    @NonNull Color unfocusedPlaceholderColor,
    @NonNull Color disabledPlaceholderColor,
    @NonNull Color errorPlaceholderColor,
    @NonNull Color focusedPrefixColor,
    @NonNull Color unfocusedPrefixColor,
    @NonNull Color disabledPrefixColor,
    @NonNull Color errorPrefixColor,
    @NonNull Color focusedSuffixColor,
    @NonNull Color unfocusedSuffixColor,
    @NonNull Color disabledSuffixColor,
    @NonNull Color errorSuffixColor
)

Creates a TextFieldColors that represents the default input text, container, and content colors (including label, placeholder, icons, etc.) used in an OutlinedTextField within an ExposedDropdownMenuBox.

Parameters
@NonNull Color focusedTextColor

the color used for the input text of this text field when focused

@NonNull Color unfocusedTextColor

the color used for the input text of this text field when not focused

@NonNull Color disabledTextColor

the color used for the input text of this text field when disabled

@NonNull Color errorTextColor

the color used for the input text of this text field when in error state

@NonNull Color focusedContainerColor

the container color for this text field when focused

@NonNull Color unfocusedContainerColor

the container color for this text field when not focused

@NonNull Color disabledContainerColor

the container color for this text field when disabled

@NonNull Color errorContainerColor

the container color for this text field when in error state

@NonNull Color cursorColor

the cursor color for this text field

@NonNull Color errorCursorColor

the cursor color for this text field when in error state

@NonNull TextSelectionColors selectionColors

the colors used when the input text of this text field is selected

@NonNull Color focusedBorderColor

the border color for this text field when focused

@NonNull Color unfocusedBorderColor

the border color for this text field when not focused

@NonNull Color disabledBorderColor

the border color for this text field when disabled

@NonNull Color errorBorderColor

the border color for this text field when in error state

@NonNull Color focusedLeadingIconColor

the leading icon color for this text field when focused

@NonNull Color unfocusedLeadingIconColor

the leading icon color for this text field when not focused

@NonNull Color disabledLeadingIconColor

the leading icon color for this text field when disabled

@NonNull Color errorLeadingIconColor

the leading icon color for this text field when in error state

@NonNull Color focusedTrailingIconColor

the trailing icon color for this text field when focused

@NonNull Color unfocusedTrailingIconColor

the trailing icon color for this text field when not focused

@NonNull Color disabledTrailingIconColor

the trailing icon color for this text field when disabled

@NonNull Color errorTrailingIconColor

the trailing icon color for this text field when in error state

@NonNull Color focusedLabelColor

the label color for this text field when focused

@NonNull Color unfocusedLabelColor

the label color for this text field when not focused

@NonNull Color disabledLabelColor

the label color for this text field when disabled

@NonNull Color errorLabelColor

the label color for this text field when in error state

@NonNull Color focusedPlaceholderColor

the placeholder color for this text field when focused

@NonNull Color unfocusedPlaceholderColor

the placeholder color for this text field when not focused

@NonNull Color disabledPlaceholderColor

the placeholder color for this text field when disabled

@NonNull Color errorPlaceholderColor

the placeholder color for this text field when in error state

@NonNull Color focusedPrefixColor

the prefix color for this text field when focused

@NonNull Color unfocusedPrefixColor

the prefix color for this text field when not focused

@NonNull Color disabledPrefixColor

the prefix color for this text field when disabled

@NonNull Color errorPrefixColor

the prefix color for this text field when in error state

@NonNull Color focusedSuffixColor

the suffix color for this text field when focused

@NonNull Color unfocusedSuffixColor

the suffix color for this text field when not focused

@NonNull Color disabledSuffixColor

the suffix color for this text field when disabled

@NonNull Color errorSuffixColor

the suffix color for this text field when in error state

textFieldColors

@Composable
public final @NonNull TextFieldColors textFieldColors(
    @NonNull Color focusedTextColor,
    @NonNull Color unfocusedTextColor,
    @NonNull Color disabledTextColor,
    @NonNull Color errorTextColor,
    @NonNull Color focusedContainerColor,
    @NonNull Color unfocusedContainerColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color errorContainerColor,
    @NonNull Color cursorColor,
    @NonNull Color errorCursorColor,
    @NonNull TextSelectionColors selectionColors,
    @NonNull Color focusedIndicatorColor,
    @NonNull Color unfocusedIndicatorColor,
    @NonNull Color disabledIndicatorColor,
    @NonNull Color errorIndicatorColor,
    @NonNull Color focusedLeadingIconColor,
    @NonNull Color unfocusedLeadingIconColor,
    @NonNull Color disabledLeadingIconColor,
    @NonNull Color errorLeadingIconColor,
    @NonNull Color focusedTrailingIconColor,
    @NonNull Color unfocusedTrailingIconColor,
    @NonNull Color disabledTrailingIconColor,
    @NonNull Color errorTrailingIconColor,
    @NonNull Color focusedLabelColor,
    @NonNull Color unfocusedLabelColor,
    @NonNull Color disabledLabelColor,
    @NonNull Color errorLabelColor,
    @NonNull Color focusedPlaceholderColor,
    @NonNull Color unfocusedPlaceholderColor,
    @NonNull Color disabledPlaceholderColor,
    @NonNull Color errorPlaceholderColor,
    @NonNull Color focusedPrefixColor,
    @NonNull Color unfocusedPrefixColor,
    @NonNull Color disabledPrefixColor,
    @NonNull Color errorPrefixColor,
    @NonNull Color focusedSuffixColor,
    @NonNull Color unfocusedSuffixColor,
    @NonNull Color disabledSuffixColor,
    @NonNull Color errorSuffixColor
)

Creates a TextFieldColors that represents the default input text, container, and content colors (including label, placeholder, icons, etc.) used in a TextField within an ExposedDropdownMenuBox.

Parameters
@NonNull Color focusedTextColor

the color used for the input text of this text field when focused

@NonNull Color unfocusedTextColor

the color used for the input text of this text field when not focused

@NonNull Color disabledTextColor

the color used for the input text of this text field when disabled

@NonNull Color errorTextColor

the color used for the input text of this text field when in error state

@NonNull Color focusedContainerColor

the container color for this text field when focused

@NonNull Color unfocusedContainerColor

the container color for this text field when not focused

@NonNull Color disabledContainerColor

the container color for this text field when disabled

@NonNull Color errorContainerColor

the container color for this text field when in error state

@NonNull Color cursorColor

the cursor color for this text field

@NonNull Color errorCursorColor

the cursor color for this text field when in error state

@NonNull TextSelectionColors selectionColors

the colors used when the input text of this text field is selected

@NonNull Color focusedIndicatorColor

the indicator color for this text field when focused

@NonNull Color unfocusedIndicatorColor

the indicator color for this text field when not focused

@NonNull Color disabledIndicatorColor

the indicator color for this text field when disabled

@NonNull Color errorIndicatorColor

the indicator color for this text field when in error state

@NonNull Color focusedLeadingIconColor

the leading icon color for this text field when focused

@NonNull Color unfocusedLeadingIconColor

the leading icon color for this text field when not focused

@NonNull Color disabledLeadingIconColor

the leading icon color for this text field when disabled

@NonNull Color errorLeadingIconColor

the leading icon color for this text field when in error state

@NonNull Color focusedTrailingIconColor

the trailing icon color for this text field when focused

@NonNull Color unfocusedTrailingIconColor

the trailing icon color for this text field when not focused

@NonNull Color disabledTrailingIconColor

the trailing icon color for this text field when disabled

@NonNull Color errorTrailingIconColor

the trailing icon color for this text field when in error state

@NonNull Color focusedLabelColor

the label color for this text field when focused

@NonNull Color unfocusedLabelColor

the label color for this text field when not focused

@NonNull Color disabledLabelColor

the label color for this text field when disabled

@NonNull Color errorLabelColor

the label color for this text field when in error state

@NonNull Color focusedPlaceholderColor

the placeholder color for this text field when focused

@NonNull Color unfocusedPlaceholderColor

the placeholder color for this text field when not focused

@NonNull Color disabledPlaceholderColor

the placeholder color for this text field when disabled

@NonNull Color errorPlaceholderColor

the placeholder color for this text field when in error state

@NonNull Color focusedPrefixColor

the prefix color for this text field when focused

@NonNull Color unfocusedPrefixColor

the prefix color for this text field when not focused

@NonNull Color disabledPrefixColor

the prefix color for this text field when disabled

@NonNull Color errorPrefixColor

the prefix color for this text field when in error state

@NonNull Color focusedSuffixColor

the suffix color for this text field when focused

@NonNull Color unfocusedSuffixColor

the suffix color for this text field when not focused

@NonNull Color disabledSuffixColor

the suffix color for this text field when disabled

@NonNull Color errorSuffixColor

the suffix color for this text field when in error state