# NavController.OnDestinationChangedListener

Artifact: [androidx.navigation:navigation-runtime](https://developer.android.com/jetpack/androidx/releases/navigation) [View Source](https://cs.android.com/search?q=file:androidx/navigation/NavController.+class:androidx.navigation.NavController.OnDestinationChangedListener) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigation#1.0.0)

*** ** * ** ***

Common/AllAndroid/JVMJavaScript
- Cmn

  ```
  fun interface NavController.OnDestinationChangedListener
  ```

*** ** * ** ***

OnDestinationChangedListener receives a callback when the `https://developer.android.com/reference/kotlin/androidx/navigation/NavController#currentDestination()` or its arguments change.

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavController.OnDestinationChangedListener#onDestinationChanged(androidx.navigation.NavController,androidx.navigation.NavDestination,android.os.Bundle)( controller: https://developer.android.com/reference/kotlin/androidx/navigation/NavController, destination: https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination, arguments: https://developer.android.com/reference/android/os/Bundle.html? )` Callback for when the `https://developer.android.com/reference/kotlin/androidx/navigation/NavController#currentDestination()` or its arguments change. | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavController.OnDestinationChangedListener#onDestinationChanged(androidx.navigation.NavController,androidx.navigation.NavDestination,androidx.savedstate.SavedState)( controller: https://developer.android.com/reference/kotlin/androidx/navigation/NavController, destination: https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination, arguments: https://developer.android.com/reference/kotlin/androidx/savedstate/SavedState? )` Callback for when the `https://developer.android.com/reference/kotlin/androidx/navigation/NavController#currentDestination()` or its arguments change. | Cmn |

## Public functions

### onDestinationChanged

android Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigation#1.0.0)

```
fun onDestinationChanged(
    controller: NavController,
    destination: NavDestination,
    arguments: Bundle?
): Unit
```

Callback for when the `https://developer.android.com/reference/kotlin/androidx/navigation/NavController#currentDestination()` 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: https://developer.android.com/reference/kotlin/androidx/navigation/NavController` | the controller that navigated |
| `destination: https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination` | the new destination |
| `arguments: https://developer.android.com/reference/android/os/Bundle.html?` | the arguments passed to the destination |

### onDestinationChanged

Cmn

```
fun onDestinationChanged(
    controller: NavController,
    destination: NavDestination,
    arguments: SavedState?
): Unit
```

Callback for when the `https://developer.android.com/reference/kotlin/androidx/navigation/NavController#currentDestination()` 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: https://developer.android.com/reference/kotlin/androidx/navigation/NavController` | the controller that navigated |
| `destination: https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination` | the new destination |
| `arguments: https://developer.android.com/reference/kotlin/androidx/savedstate/SavedState?` | the arguments passed to the destination |