NavigationViewKt

Added in 1.0.0

public final class NavigationViewKt


Summary

Public methods

static final void
setupWithNavController(
    @NonNull NavigationView receiver,
    @NonNull NavController navController
)

Sets up a NavigationView for use with a NavController.

Public methods

setupWithNavController

public static final void setupWithNavController(
    @NonNull NavigationView receiver,
    @NonNull NavController navController
)

Sets up a NavigationView for use with a NavController. This will call android.view.MenuItem.onNavDestinationSelected when a menu item is selected.

The selected item in the NavigationView will automatically be updated when the destination changes.