Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

corbind-navigation

To add androidx navigation bindings, import corbind-navigation module:

dependencies {
    implementation("ru.ldralighieri.corbind:corbind-navigation:1.12.1")
}

List of extensions

Component Extension Description
NavController destinationChanges Called when the NavController destination or its arguments change.
destinationChangeEvents A more advanced version of the destinationChanges.

Simple examples

navController.destinationChanges() // Flow<NavDestination>
    .onEach { destination ->
        if (destination.id == R.id.fragment_dashboard) {
            hideSoftInput()
        }
    }
    .flowWithLifecycle(lifecycle)
    .launchIn(lifecycleScope) // lifecycle-runtime-ktx

More examples in source code