Setting Up NavHost
Define a navigation graph in Compose.
Navigating Between Screens
Most apps have more than one screen. The Navigation Compose library lets you move between composable screens while keeping a back stack.
The Dependency
Add the navigation library to your Gradle file, then you get NavController, NavHost, and helpers.
// build.gradle (module)
implementation("androidx.navigation:navigation-compose:2.7.0")All lessons in this course
- Setting Up NavHost
- Navigating Between Screens
- Passing Arguments
- Bottom Navigation