SelectableMenuItemColors


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.

Summary

Public constructors

SelectableMenuItemColors(
    textColor: Color,
    containerColor: Color,
    leadingIconColor: Color,
    trailingContentColor: Color,
    disabledTextColor: Color,
    disabledContainerColor: Color,
    disabledLeadingIconColor: Color,
    disabledTrailingContentColor: Color,
    selectedTextColor: Color,
    selectedContainerColor: Color,
    selectedLeadingIconColor: Color,
    selectedTrailingContentColor: Color
)
Cmn

Public functions

SelectableMenuItemColors
copy(
    textColor: Color,
    containerColor: Color,
    leadingIconColor: Color,
    trailingContentColor: Color,
    disabledTextColor: Color,
    disabledContainerColor: Color,
    disabledLeadingIconColor: Color,
    disabledTrailingContentColor: Color,
    selectedTextColor: Color,
    selectedContainerColor: Color,
    selectedLeadingIconColor: Color,
    selectedTrailingContentColor: Color
)

Returns a copy of this SelectableMenuItemColors, optionally overriding some of the values.

Cmn
open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn

Public properties

Color

the container color of this menu item when enabled and unselected

Cmn
Color

the container color of this menu item when not enabled; takes priority if the item is both selected and disabled

Cmn
Color

the leading icon color of this menu item when not enabled; takes priority if the item is both selected and disabled

Cmn
Color

the text color of this menu item when not enabled; takes priority if the item is both selected and disabled

Cmn
Color

the trailing content color of this menu item when not enabled; takes priority if the item is both selected and disabled

Cmn
Color

the leading icon color of this menu item when enabled and unselected

Cmn
Color

the container color of this menu item when enabled and selected

Cmn
Color

the leading icon color of this menu item when enabled and selected

Cmn
Color

the text color of this menu item when enabled and selected

Cmn
Color

the trailing content color of this menu item when enabled and selected

Cmn
Color

the text color of this menu item when enabled and unselected

Cmn
Color

the trailing content color of this menu item when enabled and unselected

Cmn

Public constructors

SelectableMenuItemColors

SelectableMenuItemColors(
    textColor: Color,
    containerColor: Color,
    leadingIconColor: Color,
    trailingContentColor: Color,
    disabledTextColor: Color,
    disabledContainerColor: Color,
    disabledLeadingIconColor: Color,
    disabledTrailingContentColor: Color,
    selectedTextColor: Color,
    selectedContainerColor: Color,
    selectedLeadingIconColor: Color,
    selectedTrailingContentColor: Color
)
Parameters
textColor: Color

the text color of this menu item when enabled and unselected

containerColor: Color

the container color of this menu item when enabled and unselected

leadingIconColor: Color

the leading icon color of this menu item when enabled and unselected

trailingContentColor: Color

the trailing content color of this menu item when enabled and unselected

disabledTextColor: Color

the text color of this menu item when not enabled; takes priority if the item is both selected and disabled

disabledContainerColor: Color

the container color of this menu item when not enabled; takes priority if the item is both selected and disabled

disabledLeadingIconColor: Color

the leading icon color of this menu item when not enabled; takes priority if the item is both selected and disabled

disabledTrailingContentColor: Color

the trailing content color of this menu item when not enabled; takes priority if the item is both selected and disabled

selectedTextColor: Color

the text color of this menu item when enabled and selected

selectedContainerColor: Color

the container color of this menu item when enabled and selected

selectedLeadingIconColor: Color

the leading icon color of this menu item when enabled and selected

selectedTrailingContentColor: Color

the trailing content color of this menu item when enabled and selected

Public functions

copy

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: Color = this.textColor

the text color of this menu item when enabled and unselected

containerColor: Color = this.containerColor

the container color of this menu item when enabled and unselected

leadingIconColor: Color = this.leadingIconColor

the leading icon color of this menu item when enabled and unselected

trailingContentColor: Color = this.trailingContentColor

the trailing content color of this menu item when enabled and unselected

disabledTextColor: Color = this.disabledTextColor

the text color of this menu item when not enabled; takes priority if the item is both selected and disabled

disabledContainerColor: Color = this.disabledContainerColor

the container color of this menu item when not enabled; takes priority if the item is both selected and disabled

disabledLeadingIconColor: Color = this.disabledLeadingIconColor

the leading icon color of this menu item when not enabled; takes priority if the item is both selected and disabled

disabledTrailingContentColor: Color = this.disabledTrailingContentColor

the trailing content color of this menu item when not enabled; takes priority if the item is both selected and disabled

selectedTextColor: Color = this.selectedTextColor

the text color of this menu item when enabled and selected

selectedContainerColor: Color = this.selectedContainerColor

the container color of this menu item when enabled and selected

selectedLeadingIconColor: Color = this.selectedLeadingIconColor

the leading icon color of this menu item when enabled and selected

selectedTrailingContentColor: Color = this.selectedTrailingContentColor

the trailing content color of this menu item when enabled and selected

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

Public properties

containerColor

val containerColorColor

the container color of this menu item when enabled and unselected

disabledContainerColor

val disabledContainerColorColor

the container color of this menu item when not enabled; takes priority if the item is both selected and disabled

disabledLeadingIconColor

val disabledLeadingIconColorColor

the leading icon color of this menu item when not enabled; takes priority if the item is both selected and disabled

disabledTextColor

val disabledTextColorColor

the text color of this menu item when not enabled; takes priority if the item is both selected and disabled

disabledTrailingContentColor

val disabledTrailingContentColorColor

the trailing content color of this menu item when not enabled; takes priority if the item is both selected and disabled

leadingIconColor

val leadingIconColorColor

the leading icon color of this menu item when enabled and unselected

selectedContainerColor

val selectedContainerColorColor

the container color of this menu item when enabled and selected

selectedLeadingIconColor

val selectedLeadingIconColorColor

the leading icon color of this menu item when enabled and selected

selectedTextColor

val selectedTextColorColor

the text color of this menu item when enabled and selected

selectedTrailingContentColor

val selectedTrailingContentColorColor

the trailing content color of this menu item when enabled and selected

textColor

val textColorColor

the text color of this menu item when enabled and unselected

trailingContentColor

val trailingContentColorColor

the trailing content color of this menu item when enabled and unselected