Navigation between different screens and apps is a core part of the user experience. Android Jetpack Navigation Component helps the developer to implement it following the good practices. For more info see documentation: https://developer.android.com/guide/navigation
Questions tagged [android-jetpack-navigation]
834 questions
6
votes
1 answer
Android: Double clicking fast on any views related to Navigation component crashes the app
I have an app built with navigation component. I have a field in my graph which slide up a bottom sheet dialog fragment upon cliking on a filter icon on the toolbar. However, if i double click really fast on the toolbar filter icon or click really…

Mervin Hemaraju
- 1,921
- 2
- 22
- 71
6
votes
1 answer
Android Jetpack Navigation - How to navigate to nested nav graph from drawer menu item
I was curious how one would be able to navigate to a nested navigation graph from a menu item in a drawer layout using the navigation graph from Android Jetpack. I know that there is some magic behind the scenes that links menu items with fragments…

KevinM
- 209
- 2
- 13
6
votes
2 answers
Androidx - How to handle Nested Graph's fragments from parent fragment using Navigation?
Here is the scenario:-
I am having a Main Activity which has root NavGraph and load fragment A as default. If I am moving from Fragment A to Fragment B where I have child fragment and TabLayout within it, So user can switch fragment within…

Rajat kumar
- 884
- 9
- 25
6
votes
0 answers
Android navigation components performance issues
So I recently migrated to navigation components (2.2.0-alpha01). As I was working on a high end device I didn't really noticed any slowdowns, but as soon as I finished, testers started reporting slugish app navigation.
In my navigation code I use…

SMGhost
- 3,867
- 6
- 38
- 68
6
votes
2 answers
Jetpack navigation component throws an IllegalStateException when loading a start destination with nullable argument
I added a nullable argument to my start destination:

Sebastien
- 3,583
- 4
- 43
- 82
6
votes
3 answers
NavController crashes upon orientation change
I'm not really sure what I'm doing wrong here. Simple setup, single activity with fragments controlled by a bottom bar inside, so far so good. The start fragment has a button inside which should navigate to another fragment.
Here's the…

just_deko
- 1,024
- 1
- 14
- 29
5
votes
2 answers
How to save and restore navigation state in Jetpack Compose?
I want to navigate to another screen, but i want to save current state, and then restore it. I tried to do as described in the bottom navigation documentation:
navController.navigate(Screen.CameraScreen.route) {
…

Dewerro
- 371
- 3
- 12
5
votes
1 answer
How to tell the composeTestRule to wait for the navhost transition?
I'm trying to write an integration test for an Android application entirely written in Compose that has a single Activity and uses the Compose Navigation to change the screen content.
I managed to properly interact and test the first screen that is…

Roberto Leinardi
- 10,641
- 6
- 65
- 69
5
votes
1 answer
Jetpack Compose nested navigation and BottomAppBar
I'm trying to use jetpack compose navigation, but I had a problem in understanding nested navigation and layout the scaffold.
I had an app screen structure like this
root
├─ A
├─ B <- Had a bottom navigation bar
│ ├─ C
│ ├─ D
and this is the…

Andra
- 1,282
- 2
- 11
- 34
5
votes
2 answers
Jetpack Compose Navigation - Bottom Nav Multiple Back Stack - View Model Scoping Issue
So I have two tabs, Tab A and Tab B. Each tab has its own back stack. I implemented the multiple back stack navigation using code in this google docs
val navController = rememberNavController()
Scaffold(
bottomBar = {
BottomNavigation {
…

Cedar
- 61
- 1
- 3
5
votes
2 answers
Problem with Jetpack Compose Navigation in BottomNavigationBar
Based on the following image, my App currently contains 2 main routes : Auth and Dashboard. When the user started the App, an observer will check whether the user is logged in and direct he/she to the Login Page/Dashboard.
Navigation Flow
From the…

EverDream
- 51
- 1
- 4
5
votes
1 answer
How do we handle bottom menu nav items clicks only when bottom menu items are clicked and still use setupWithNavController?
How do we track bottom menu nav items clicks only when bottom menu items are clicked and still use setupWithNavController ?
Currently using Bottom navigation view 2.4.0-alpha05, we have a use case for tracking bottom nav clicks for analytics and…

Vyshakh Amarnath
- 636
- 6
- 17
5
votes
0 answers
Using instaed of causes the app to crash on using BottomNav and jetpack navigation
I am creating an app with a BottomNavigationView.
I am using JetpackNavigation and kotlin.
I have set up my XML as

Narendra_Nath
- 4,578
- 3
- 13
- 31
5
votes
3 answers
How to handle popping back multiple screens with Jetpack Compose Navigation
I'll try to do some ASCII art to describe the problem:
<--------------------------------------\
DestinationA --> DestinationC ---------> DestinationE
DestinationB ------/ \-----> DestinationD --/
I hope that's decipherable. C can be…

Sean
- 2,632
- 2
- 27
- 35
5
votes
0 answers
Fragment is being called twice with jetpack navigation
I am using jetpack navigation and I need to pass some parameters through activity. With my actual config when I call to findNavController the fragment is called twice.
This is normal because we are calling to fragment programatycally and in the xml…

Rulogarcillan
- 1,130
- 2
- 13
- 23