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

MenuDefaults


Contains default values used for DropdownMenuItem.

Summary

Public functions

MenuItemColors

Creates a MenuItemColors that represents the default text and icon colors used in a DropdownMenuItemContent.

Cmn
MenuItemColors
@Composable
itemColors(
    textColor: Color,
    leadingIconColor: Color,
    trailingIconColor: Color,
    disabledTextColor: Color,
    disabledLeadingIconColor: Color,
    disabledTrailingIconColor: Color
)

Creates a MenuItemColors that represents the default text and icon colors used in a DropdownMenuItemContent.

Cmn

Public properties

PaddingValues

Default padding used for DropdownMenuItem.

Cmn

Public functions

itemColors

@Composable
fun itemColors(): MenuItemColors

Creates a MenuItemColors that represents the default text and icon colors used in a DropdownMenuItemContent.

itemColors

@Composable
fun itemColors(
    textColor: Color = Color.Unspecified,
    leadingIconColor: Color = Color.Unspecified,
    trailingIconColor: Color = Color.Unspecified,
    disabledTextColor: Color = Color.Unspecified,
    disabledLeadingIconColor: Color = Color.Unspecified,
    disabledTrailingIconColor: Color = Color.Unspecified
): MenuItemColors

Creates a MenuItemColors that represents the default text and icon colors used in a DropdownMenuItemContent.

Parameters
textColor: Color = Color.Unspecified

the text color of this DropdownMenuItemContent when enabled

leadingIconColor: Color = Color.Unspecified

the leading icon color of this DropdownMenuItemContent when enabled

trailingIconColor: Color = Color.Unspecified

the trailing icon color of this DropdownMenuItemContent when enabled

disabledTextColor: Color = Color.Unspecified

the text color of this DropdownMenuItemContent when not enabled

disabledLeadingIconColor: Color = Color.Unspecified

the leading icon color of this DropdownMenuItemContent when not enabled

disabledTrailingIconColor: Color = Color.Unspecified

the trailing icon color of this DropdownMenuItemContent when not enabled

Public properties

val DropdownMenuItemContentPaddingPaddingValues

Default padding used for DropdownMenuItem.