Test your understanding of Jetpack Compose navigation with this 20-question quiz covering Navigation 3 and NavDisplay. These questions assess your knowledge of key concepts, including back stack management, navigation keys, entry providers, and the NavDisplay composable.
1.
What happens when you call backStack.removeLastOrNull()?
2.
What type of parameter does NavDisplay's onBack callback receive?
3.
What tracks the user's path through app destinations?
4.
What happens to the home destination when the app first launches?
5.
How is a navigation back stack typically created?
6.
Which type of navigation key would you use to pass data to a destination?
7.
Which composable is responsible for displaying the current navigation destination?
8.
Where would you define the composable content for a destination?
9.
What determines the current visible destination?
10.
What must navigation keys implement?
11.
How do you navigate to a new destination?
12.
What happens if you try to use an empty back stack?
13.
Which annotation is typically used with navigation keys?
14.
What is the primary purpose of the Navigation 3 library in Jetpack Compose?
15.
Where would you typically place navigation logic in a Compose app?
16.
What is the purpose of the metadata property in NavEntry?
17.
What is the visual difference between a navigation bar and rail?
18.
How is navigation state preserved across configuration changes?
19.
What is the purpose of the entryProvider in NavDisplay?