{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

NavigationRailItemDefaults

public static class NavigationRailItemDefaults


Defaults used in NavigationRailItem.

Summary

Public fields

static @NonNull NavigationRailItemDefaults

Public methods

final @NonNull NavigationRailItemColors

Creates a NavigationRailItemColors with the provided colors according to the Material specification.

final @NonNull NavigationRailItemColors
@Composable
colors(
    @NonNull Color selectedIconColor,
    @NonNull Color selectedTextColor,
    @NonNull Color indicatorColor,
    @NonNull Color unselectedIconColor,
    @NonNull Color unselectedTextColor,
    @NonNull Color disabledIconColor,
    @NonNull Color disabledTextColor
)

Creates a NavigationRailItemColors with the provided colors according to the Material specification.

Public fields

INSTANCE

public static @NonNull NavigationRailItemDefaults INSTANCE

Public methods

colors

@Composable
public final @NonNull NavigationRailItemColors colors()

Creates a NavigationRailItemColors with the provided colors according to the Material specification.

colors

@Composable
public final @NonNull NavigationRailItemColors colors(
    @NonNull Color selectedIconColor,
    @NonNull Color selectedTextColor,
    @NonNull Color indicatorColor,
    @NonNull Color unselectedIconColor,
    @NonNull Color unselectedTextColor,
    @NonNull Color disabledIconColor,
    @NonNull Color disabledTextColor
)

Creates a NavigationRailItemColors with the provided colors according to the Material specification.

Parameters
@NonNull Color selectedIconColor

the color to use for the icon when the item is selected.

@NonNull Color selectedTextColor

the color to use for the text label when the item is selected.

@NonNull Color indicatorColor

the color to use for the indicator when the item is selected.

@NonNull Color unselectedIconColor

the color to use for the icon when the item is unselected.

@NonNull Color unselectedTextColor

the color to use for the text label when the item is unselected.

@NonNull Color disabledIconColor

the color to use for the icon when the item is disabled.

@NonNull Color disabledTextColor

the color to use for the text label when the item is disabled.