🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

MenuItemColors

Represents the text and icon colors used in a menu item at different states.

Source set: Common
public class MenuItemColors(
    public val textColor: Color,
    public val leadingIconColor: Color,
    public val trailingIconColor: Color,
    public val disabledTextColor: Color,
    public val disabledLeadingIconColor: Color,
    public val disabledTrailingIconColor: Color,
)

Represents the text and icon colors used in a menu item at different states.

Parameters

textColor the text color of this DropdownMenuItem when enabled and unselected / unchecked.
leadingIconColor the leading icon color of this DropdownMenuItem when enabled and unselected / unchecked.
trailingIconColor the trailing icon color of this DropdownMenuItem when enabled and unselected / unchecked.
disabledTextColor the text color of this DropdownMenuItem when not enabled
disabledLeadingIconColor the leading icon color of this DropdownMenuItem when not enabled
disabledTrailingIconColor the trailing icon color of this DropdownMenuItem when not enabled

Properties

containerColor

Source set: Common
public var containerColor: Color = Color.Unspecified

The container color of this menu item when enabled.

disabledContainerColor

Source set: Common
public var disabledContainerColor: Color = Color.Unspecified

The container color of this menu item when not enabled.

selectedContainerColor

Source set: Common
@Deprecated("Use SelectableMenuItemColors instead.")
    public val selectedContainerColor: Color

The container color of this menu item when enabled and selected.

selectedTextColor

Source set: Common
@Deprecated("Use SelectableMenuItemColors instead.")
    public val selectedTextColor: Color

The text color of this menu item when enabled and selected.

selectedLeadingIconColor

Source set: Common
@Deprecated("Use SelectableMenuItemColors instead.")
    public val selectedLeadingIconColor: Color

The leading icon color of this menu item when enabled and selected.

selectedTrailingIconColor

Source set: Common
@Deprecated("Use SelectableMenuItemColors instead.")
    public val selectedTrailingIconColor: Color

The trailing icon color of this menu item when enabled and selected.

selectedTrailingContentColor

Source set: Common
@Deprecated("Use SelectableMenuItemColors instead.")
    public val selectedTrailingContentColor: Color

The trailing content color of this menu item when enabled and selected.

Functions

copy

Source set: Common
@Deprecated("Maintained for binary compatibility.", level = DeprecationLevel.HIDDEN)
    public fun copy(
        textColor: Color = this.textColor,
        leadingIconColor: Color = this.leadingIconColor,
        trailingIconColor: Color = this.trailingIconColor,
        disabledTextColor: Color = this.disabledTextColor,
        disabledLeadingIconColor: Color = this.disabledLeadingIconColor,
        disabledTrailingIconColor: Color = this.disabledTrailingIconColor,
    ): MenuItemColors

Returns a copy of this MenuItemColors, optionally overriding some of the values. This uses the Color.Unspecified to mean ā€œuse the value from the sourceā€

copy

Source set: Common
public fun copy(
        textColor: Color = this.textColor,
        containerColor: Color = this.containerColor,
        leadingIconColor: Color = this.leadingIconColor,
        trailingIconColor: Color = this.trailingIconColor,
        disabledTextColor: Color = this.disabledTextColor,
        disabledContainerColor: Color = this.disabledContainerColor,
        disabledLeadingIconColor: Color = this.disabledLeadingIconColor,
        disabledTrailingIconColor: Color = this.disabledTrailingIconColor,
    ): MenuItemColors

Returns a copy of this MenuItemColors, optionally overriding some of the values. This uses the Color.Unspecified to mean ā€œuse the value from the sourceā€

copy

Source set: Common
@Deprecated(
        "MenuItemColors no longer supports selected colors. Use SelectableMenuItemColors instead."
    )
    public fun copy(
        textColor: Color = this.textColor,
        containerColor: Color = this.containerColor,
        leadingIconColor: Color = this.leadingIconColor,
        trailingIconColor: Color = this.trailingIconColor,
        disabledTextColor: Color = this.disabledTextColor,
        disabledContainerColor: Color = this.disabledContainerColor,
        disabledLeadingIconColor: Color = this.disabledLeadingIconColor,
        disabledTrailingIconColor: Color = this.disabledTrailingIconColor,
        selectedTextColor: Color = Color.Unspecified,
        selectedContainerColor: Color = Color.Unspecified,
        selectedLeadingIconColor: Color = Color.Unspecified,
        selectedTrailingIconColor: Color = Color.Unspecified,
    ): MenuItemColors

Returns a copy of this MenuItemColors, optionally overriding some of the values. This uses the Color.Unspecified to mean ā€œuse the value from the sourceā€

equals

Source set: Common
override fun equals(other: Any?): Boolean

hashCode

Source set: Common
override fun hashCode(): Int

Content updated: