MenuItemColors
-
Cmn
class MenuItemColors
Represents the text and icon colors used in a menu item at different states.
Summary
Public constructors |
|
|---|---|
MenuItemColors(Creates an instance with colors for a standard menu item. |
Cmn
|
@ExperimentalMaterial3ExpressiveApicreate an instance with arbitrary colors. |
Cmn
|
Public functions |
||
|---|---|---|
MenuItemColors |
copy(Returns a copy of this MenuItemColors, optionally overriding some of the values. |
Cmn
|
MenuItemColors |
@ExperimentalMaterial3ExpressiveApiReturns a copy of this MenuItemColors, optionally overriding some of the values. |
Cmn
|
open operator Boolean |
Cmn
|
|
open Int |
hashCode() |
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 |
Cmn
|
Color |
the leading icon color of this |
Cmn
|
Color |
the text color of this |
Cmn
|
Color |
the trailing icon color of this |
Cmn
|
Color |
the leading icon color of this |
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 icon color of this menu item when enabled and selected. |
Cmn
|
Color |
the text color of this |
Cmn
|
Color |
the trailing icon color of this |
Cmn
|
Public constructors
MenuItemColors
MenuItemColors(
textColor: Color,
leadingIconColor: Color,
trailingIconColor: Color,
disabledTextColor: Color,
disabledLeadingIconColor: Color,
disabledTrailingIconColor: Color
)
Creates an instance with colors for a standard menu item.
This constructor is used for DropdownMenuItem.
| Parameters | |
|---|---|
textColor: Color |
the text color of this menu item when enabled |
leadingIconColor: Color |
the leading icon color of this menu item when enabled |
trailingIconColor: Color |
the trailing icon color of this menu item when enabled |
disabledTextColor: Color |
the text color of this menu item when not enabled |
disabledLeadingIconColor: Color |
the leading icon color of this menu item when not enabled |
disabledTrailingIconColor: Color |
the trailing icon color of this menu item when not enabled |
MenuItemColors
@ExperimentalMaterial3ExpressiveApi
MenuItemColors(
textColor: Color,
leadingIconColor: Color,
trailingIconColor: Color,
disabledTextColor: Color,
disabledLeadingIconColor: Color,
disabledTrailingIconColor: Color,
containerColor: Color,
disabledContainerColor: Color,
selectedTextColor: Color,
selectedLeadingIconColor: Color,
selectedTrailingIconColor: Color,
selectedContainerColor: Color
)
create an instance with arbitrary colors. See MenuDefaults.itemColors for the default colors used in a DropdownMenuItemContent.
| Parameters | |
|---|---|
textColor: Color |
the text color of this |
leadingIconColor: Color |
the leading icon color of this |
trailingIconColor: Color |
the trailing icon color of this |
disabledTextColor: Color |
the text color of this |
disabledLeadingIconColor: Color |
the leading icon color of this |
disabledTrailingIconColor: Color |
the trailing icon color of this |
containerColor: Color |
the container color of this menu item when enabled and unselected |
disabledContainerColor: Color |
the container color of this menu item when not enabled |
selectedTextColor: Color |
the text color of this menu item when enabled and selected |
selectedLeadingIconColor: Color |
the leading icon color of this menu item when enabled and selected |
selectedTrailingIconColor: Color |
the trailing icon color of this menu item when enabled and selected |
selectedContainerColor: Color |
the container color of this menu item when enabled and selected |
Public functions
copy
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
@ExperimentalMaterial3ExpressiveApi
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 = this.selectedTextColor,
selectedContainerColor: Color = this.selectedContainerColor,
selectedLeadingIconColor: Color = this.selectedLeadingIconColor,
selectedTrailingIconColor: Color = this.selectedTrailingIconColor
): 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”
Public properties
containerColor
@ExperimentalMaterial3ExpressiveApi
val containerColor: Color
The container color of this menu item when enabled and unselected.
disabledContainerColor
@ExperimentalMaterial3ExpressiveApi
val disabledContainerColor: Color
The container color of this menu item when not enabled
disabledLeadingIconColor
val disabledLeadingIconColor: Color
the leading icon color of this DropdownMenuItemContent when not enabled
disabledTextColor
val disabledTextColor: Color
the text color of this DropdownMenuItemContent when not enabled
disabledTrailingIconColor
val disabledTrailingIconColor: Color
the trailing icon color of this DropdownMenuItemContent when not enabled
leadingIconColor
val leadingIconColor: Color
the leading icon color of this DropdownMenuItemContent when enabled
selectedContainerColor
@ExperimentalMaterial3ExpressiveApi
val selectedContainerColor: Color
The container color of this menu item when enabled and selected.
selectedLeadingIconColor
@ExperimentalMaterial3ExpressiveApi
val selectedLeadingIconColor: Color
The leading icon color of this menu item when enabled and selected.
selectedTextColor
@ExperimentalMaterial3ExpressiveApi
val selectedTextColor: Color
The text color of this menu item when enabled and selected.
selectedTrailingIconColor
@ExperimentalMaterial3ExpressiveApi
val selectedTrailingIconColor: Color
The trailing icon color of this menu item when enabled and selected.
trailingIconColor
val trailingIconColor: Color
the trailing icon color of this DropdownMenuItemContent when enabled