0Pricing
Android Academy · Lesson

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

  1. Setting Up NavHost
  2. Navigating Between Screens
  3. Passing Arguments
  4. Bottom Navigation
← Back to Android Academy