0Pricing
Android Academy · Lesson

Passing Arguments

Send data to a destination.

Passing Data Between Screens

Often a destination needs data — like the id of the item to display. In Navigation Compose you encode arguments directly in the route, similar to a URL.

Route with a Placeholder

Declare a placeholder in the route using curly braces. Here {id} is an argument named id.

composable("details/{id}") { backStackEntry ->
    // read id here
}

All lessons in this course

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