Navigation Questions with Answers

9 practice questions on Navigation (Android (Kotlin & Compose)) with answers and step-by-step solutions. Try 9 samples below, then practise all 9 free in the AptiNest app.

Sample questions

Question 1Easy

In Navigation Compose, each destination is identified by a:

  1. Intent filter
  2. Route
  3. Thread
  4. Port

Answer: B. Route

Explanation

Routes (strings or type-safe objects) identify composable destinations.

Step-by-step solution

  1. In Navigation Compose, destinations are added with composable(route) { ... }.
  2. A route identifies each destination.
  3. navController.navigate(route) moves to it.

Why the other options are wrong

  • A. Intent filters are for activities in the manifest.
  • C. Threads run code; they do not identify screens.
  • D. Ports belong to networking.

Tip: Compose navigation: route = screen address.

Question 2Easy

Which object is used to move between destinations, e.g. navigate("details")?

  1. NavController
  2. ViewModelStore
  3. FragmentManager only
  4. Intent

Answer: A. NavController

Explanation

Obtain it with rememberNavController() in Compose.

Step-by-step solution

  1. NavController manages the back stack.
  2. navigate("details") pushes a destination.
  3. popBackStack() goes back.

Why the other options are wrong

  • B. ViewModelStore stores ViewModels.
  • C. FragmentManager is the older approach.
  • D. Intents start Activities.

Question 3Easy

What does navController.popBackStack() do?

  1. Goes back one screen
  2. Clears all app data
  3. Opens a new Activity
  4. Restarts the NavHost

Answer: A. Goes back one screen

Explanation

It pops the current destination off the back stack.

Step-by-step solution

  1. The back stack holds visited destinations.
  2. popBackStack() removes the top one.
  3. The previous screen shows.

Why the other options are wrong

  • B. Data is untouched.
  • C. No Activity is involved.
  • D. The NavHost is not restarted.

Question 4Easy

In Navigation Compose, which composable hosts the navigation graph?

  1. Scaffold
  2. NavHost
  3. NavDrawer
  4. LazyColumn

Answer: B. NavHost

Explanation

NavHost displays the destination for the current route.

Step-by-step solution

  1. NavHost is a composable that hosts the navigation graph.
  2. It takes a NavController and a start destination.
  3. It swaps screens based on the current route.

Why the other options are wrong

  • A. Scaffold provides layout slots.
  • C. NavDrawer is not the host.
  • D. LazyColumn is a list.

Question 5Easy

The list of screens the user can return to with Back is called the:

  1. Back stack
  2. Task queue
  3. Call stack
  4. Heap

Answer: A. Back stack

Explanation

Navigation pushes destinations onto the back stack and pops them on Back.

Step-by-step solution

  1. Each screen the user opens is pushed onto a stack.
  2. Pressing Back pops the top screen.
  3. This stack is called the back stack.

Why the other options are wrong

  • B. Task queue is not the Android term.
  • C. The call stack holds function calls, not screens.
  • D. The heap is memory for objects.

Tip: Back stack = LIFO of screens.

Question 6Medium

The "single-activity architecture" recommended for modern apps means:

  1. Every screen is a separate Activity
  2. Activities are replaced by Services
  3. One Activity hosts all screens
  4. The app can have only one screen

Answer: C. One Activity hosts all screens

Explanation

Screens are composables or fragments managed by the Navigation component.

Step-by-step solution

  1. One Activity is the app's entry point.
  2. Screens are composables or fragments inside it.
  3. Navigation swaps them within that Activity.

Why the other options are wrong

  • A. That is the older many-Activity style.
  • B. Services do background work, not UI.
  • D. The app can have many screens.

Question 7Medium

A deep link in Android navigation lets:

  1. Two apps share a database
  2. The app run without a network
  3. Screens load faster
  4. A URL open a given screen

Answer: D. A URL open a given screen

Explanation

Deep links map URIs to destinations so links from email or the web open the right screen.

Step-by-step solution

  1. A deep link maps a URL or URI to a screen inside the app.
  2. Tapping such a link opens that screen directly.
  3. Example: a product link opening the product page.

Why the other options are wrong

  • A. Sharing databases uses content providers, not deep links.
  • B. Offline support has nothing to do with deep links.
  • C. Deep links do not make screens load faster.

Tip: Deep link = URL to a specific screen.

Question 8Medium

Passing a large object (like a full list) as a navigation argument is discouraged because:

  1. It is slower to type
  2. Compose forbids objects
  3. Arguments go in saved state
  4. Navigation only supports Strings of one letter

Answer: C. Arguments go in saved state

Explanation

Pass a minimal identifier and load the data from the repository in the destination's ViewModel.

Step-by-step solution

  1. Navigation arguments are saved in the saved-state Bundle.
  2. Bundles have size limits (about 1 MB per transaction).
  3. Pass an ID and load the object from a repository instead.

Why the other options are wrong

  • A. Typing speed is irrelevant.
  • B. Compose does not forbid objects.
  • D. Navigation supports several argument types.

Tip: Pass IDs, not objects.

Question 9Hard

After a successful login you navigate to Home and don't want Back to return to Login. What do you use?

  1. Disable the back button globally
  2. popUpTo(login) with inclusive
  3. finish() the composable
  4. navigate twice to Home

Answer: B. popUpTo(login) with inclusive

Explanation

popUpTo removes destinations from the back stack while navigating; inclusive also removes Login itself.

Step-by-step solution

  1. navigate("home") { popUpTo("login") { inclusive = true } }.
  2. popUpTo removes destinations up to login.
  3. inclusive = true removes login as well, so Back leaves the app.

Why the other options are wrong

  • A. Disabling Back globally breaks expected behaviour.
  • C. Composables cannot be finished.
  • D. Navigating twice stacks duplicates.

Practise all 9 questions free

The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.

Open this topic in the app →

Related topics

See all Android (Kotlin & Compose) topics · All topics