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

SelectableMenuItemColors

Represents the text, icon, and container colors used in a selectable DropdownMenuItem at different states.

Source set: Common
public class SelectableMenuItemColors(
    public val textColor: Color,
    public val containerColor: Color,
    public val leadingIconColor: Color,
    public val trailingContentColor: Color,
    public val disabledTextColor: Color,
    public val disabledContainerColor: Color,
    public val disabledLeadingIconColor: Color,
    public val disabledTrailingContentColor: Color,
    public val selectedTextColor: Color,
    public val selectedContainerColor: Color,
    public val selectedLeadingIconColor: Color,
    public val selectedTrailingContentColor: Color,
)

Represents the text, icon, and container colors used in a selectable DropdownMenuItem at different states.

When the item is disabled, disabled colors take priority over selected colors.

Parameters

textColor the text color of this menu item when enabled and unselected
containerColor the container color of this menu item when enabled and unselected
leadingIconColor the leading icon color of this menu item when enabled and unselected
trailingContentColor the trailing content color of this menu item when enabled and unselected
disabledTextColor the text color of this menu item when not enabled; takes priority if the item is both selected and disabled
disabledContainerColor the container color of this menu item when not enabled; takes priority if the item is both selected and disabled
disabledLeadingIconColor the leading icon color of this menu item when not enabled; takes priority if the item is both selected and disabled
disabledTrailingContentColor the trailing content color of this menu item when not enabled; takes priority if the item is both selected and disabled
selectedTextColor the text color of this menu item when enabled and selected
selectedContainerColor the container color of this menu item when enabled and selected
selectedLeadingIconColor the leading icon color of this menu item when enabled and selected
selectedTrailingContentColor the trailing content color of this menu item when enabled and selected

Functions

copy

Source set: Common
public fun copy(
        textColor: Color = this.textColor,
        containerColor: Color = this.containerColor,
        leadingIconColor: Color = this.leadingIconColor,
        trailingContentColor: Color = this.trailingContentColor,
        disabledTextColor: Color = this.disabledTextColor,
        disabledContainerColor: Color = this.disabledContainerColor,
        disabledLeadingIconColor: Color = this.disabledLeadingIconColor,
        disabledTrailingContentColor: Color = this.disabledTrailingContentColor,
        selectedTextColor: Color = this.selectedTextColor,
        selectedContainerColor: Color = this.selectedContainerColor,
        selectedLeadingIconColor: Color = this.selectedLeadingIconColor,
        selectedTrailingContentColor: Color = this.selectedTrailingContentColor,
    ): SelectableMenuItemColors

Returns a copy of this SelectableMenuItemColors, optionally overriding some of the values. This uses Color.Unspecified to mean “use the value from the source”.

When the item is disabled, disabled colors take priority over selected colors.

Parameters

textColor the text color of this menu item when enabled and unselected
containerColor the container color of this menu item when enabled and unselected
leadingIconColor the leading icon color of this menu item when enabled and unselected
trailingContentColor the trailing content color of this menu item when enabled and unselected
disabledTextColor the text color of this menu item when not enabled; takes priority if the item is both selected and disabled
disabledContainerColor the container color of this menu item when not enabled; takes priority if the item is both selected and disabled
disabledLeadingIconColor the leading icon color of this menu item when not enabled; takes priority if the item is both selected and disabled
disabledTrailingContentColor the trailing content color of this menu item when not enabled; takes priority if the item is both selected and disabled
selectedTextColor the text color of this menu item when enabled and selected
selectedContainerColor the container color of this menu item when enabled and selected
selectedLeadingIconColor the leading icon color of this menu item when enabled and selected
selectedTrailingContentColor the trailing content color of this menu item when enabled and selected

equals

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

hashCode

Source set: Common
override fun hashCode(): Int

Content updated: