Skip to content

Instantly share code, notes, and snippets.

@cdmunoz
Created March 16, 2020 03:45
Show Gist options
  • Save cdmunoz/2f02bad12f66a0987bc2e4d098abf175 to your computer and use it in GitHub Desktop.
Save cdmunoz/2f02bad12f66a0987bc2e4d098abf175 to your computer and use it in GitHub Desktop.
/**
* Manages the various graphs needed for a [BottomNavigationView].
* This sample is a workaround until the Navigation Component supports multiple back stacks.
* Taken from:
* https://github.com/android/architecture-components-samples/blob/master/NavigationAdvancedSample
* /app/src/main/java/com/example/android/navigationadvancedsample/NavigationExtensions.kt
*/
fun BottomNavigationView.setupWithNavController(
navGraphIds: List<Int>,
fragmentManager: FragmentManager,
containerId: Int,
intent: Intent
): LiveData<NavController> {
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment