public interface

NavController.OnDestinationChangedListener

 androidx.navigation.NavController.OnDestinationChangedListener

Overview

OnDestinationChangedListener receives a callback when the NavController.getCurrentDestination() or its arguments change.

Summary

Methods
public voidonDestinationChanged(NavController controller, NavDestination destination, Bundle arguments)

Callback for when the NavController.getCurrentDestination() or its arguments change.

Methods

public void onDestinationChanged(NavController controller, NavDestination destination, Bundle arguments)

Callback for when the NavController.getCurrentDestination() or its arguments change. This navigation may be to a destination that has not been seen before, or one that was previously on the back stack. This method is called after navigation is complete, but associated transitions may still be playing.

Parameters:

controller: the controller that navigated
destination: the new destination
arguments: the arguments passed to the destination