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

NavigationItemColors

Represents the colors of the various elements of a navigation item.

Source set: Common
public class NavigationItemColors public constructor(
    public val selectedIconColor: Color,
    public val selectedTextColorTopIconPosition: Color,
    public val selectedTextColorStartIconPosition: Color,
    public val selectedIndicatorColor: Color,
    public val unselectedIconColor: Color,
    public val unselectedTextColor: Color,
    public val disabledIconColor: Color,
    public val disabledTextColor: Color,
)

Represents the colors of the various elements of a navigation item.

Parameters

selectedIconColor the color to use for the icon when the item is selected.
selectedTextColorTopIconPosition the color to use for the text label when the item is selected and is in the Top icon position configuration.
selectedTextColorStartIconPosition the color to use for the text label when the item is selected and is in the Start icon position configuration.
selectedIndicatorColor the color to use for the indicator when the item is selected.
unselectedIconColor the color to use for the icon when the item is unselected.
unselectedTextColor the color to use for the text label when the item is unselected.
disabledIconColor the color to use for the icon when the item is disabled.
disabledTextColor the color to use for the text label when the item is disabled.

Properties

selectedTextColor

Source set: Common
@Deprecated(
        message = "Use selectedTextColorTopIconPosition instead",
        replaceWith = ReplaceWith("selectedTextColorTopIconPosition"),
        level = DeprecationLevel.WARNING,
    )
    public val selectedTextColor: Color

Functions

copy

Source set: Common
@Deprecated(message = "Maintained for binary compatibility", level = DeprecationLevel.HIDDEN)
    public fun copy(
        selectedIconColor: Color = this.selectedIconColor,
        selectedTextColor: Color = Color.Unspecified,
        selectedIndicatorColor: Color = this.selectedIndicatorColor,
        unselectedIconColor: Color = this.unselectedIconColor,
        unselectedTextColor: Color = this.unselectedTextColor,
        disabledIconColor: Color = this.disabledIconColor,
        disabledTextColor: Color = this.disabledTextColor,
    ): NavigationItemColors

copy

Source set: Common
public fun copy(
        selectedIconColor: Color = this.selectedIconColor,
        selectedTextColorTopIconPosition: Color = this.selectedTextColorTopIconPosition,
        selectedTextColorStartIconPosition: Color = this.selectedTextColorStartIconPosition,
        selectedIndicatorColor: Color = this.selectedIndicatorColor,
        unselectedIconColor: Color = this.unselectedIconColor,
        unselectedTextColor: Color = this.unselectedTextColor,
        disabledIconColor: Color = this.disabledIconColor,
        disabledTextColor: Color = this.disabledTextColor,
    ): NavigationItemColors

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

iconColor

Source set: Common
public fun iconColor(selected: Boolean, enabled: Boolean): Color

Represents the icon color for this item, depending on whether it is selected.

Parameters

selected whether the item is selected
enabled whether the item is enabled

textColor

Source set: Common
@Deprecated(
        message = "Use the overload that takes isIconPositionTop instead",
        replaceWith = ReplaceWith("textColor(selected, enabled, true)"),
        level = DeprecationLevel.HIDDEN,
    )
    public fun textColor(selected: Boolean, enabled: Boolean): Color

textColor

Source set: Common
public fun textColor(
        selected: Boolean,
        enabled: Boolean,
        isIconPositionTop: Boolean = true,
    ): Color

Represents the text color for this item, depending on whether it is selected.

Parameters

selected whether the item is selected
enabled whether the item is enabled
isIconPositionTop whether the icon is at the top position

equals

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

hashCode

Source set: Common
override fun hashCode(): Int

Content updated: