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
public var containerColor: Color = Color.Unspecified
The container color of this menu item when enabled.
disabledContainerColor
public var disabledContainerColor: Color = Color.Unspecified
The container color of this menu item when not enabled.
selectedContainerColor
@Deprecated("Use SelectableMenuItemColors instead.")
public val selectedContainerColor: Color
The container color of this menu item when enabled and selected.
selectedTextColor
@Deprecated("Use SelectableMenuItemColors instead.")
public val selectedTextColor: Color
The text color of this menu item when enabled and selected.
selectedLeadingIconColor
@Deprecated("Use SelectableMenuItemColors instead.")
public val selectedLeadingIconColor: Color
The leading icon color of this menu item when enabled and selected.
selectedTrailingIconColor
@Deprecated("Use SelectableMenuItemColors instead.")
public val selectedTrailingIconColor: Color
The trailing icon color of this menu item when enabled and selected.
selectedTrailingContentColor
@Deprecated("Use SelectableMenuItemColors instead.")
public val selectedTrailingContentColor: Color
The trailing content color of this menu item when enabled and selected.
Functions
copy
@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
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
@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
override fun equals(other: Any?): Boolean
hashCode
override fun hashCode(): Int