NavigationViewKt

public final class NavigationViewKt


Summary

Public methods

static final void

Sets up a NavigationView for use with a NavController.

Public methods

NavigationViewKt.setupWithNavController

@NonNull
public static final void NavigationViewKt.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.