Questions tagged [android-navigation-graph]
303 questions
0
votes
1 answer
Execution failed for task ':app:generateSafeArgsDebug' part '' is keyword
After a merge, Android Studio started showing the following error:
IllegalArgumentException: part '' is keyword
I'm aware this error it's related with some navigation graph, but all the graph xml files seems alright. Android Studio gives no further…

Josue Gramajo
- 15
- 7
0
votes
1 answer
NavGraph deepLinking
I have this navigation graph using BottomNavigationView with 2 fragments, Home and Search and both go to Detail fragment
MainGraph.xml

Patrick
- 1,629
- 5
- 23
- 44
0
votes
0 answers
Handling different startDestination in android single activity Navigation graph
I want to implement a single activity project.
After showing splash i want to navigate to HomeFragment or LoginFragment based on user's login condition. In the MainActivity :
override fun onCreate(savedInstanceState: Bundle?) {
val splashScreen…

Arpi E
- 51
- 5
0
votes
1 answer
Is there a way to update Jetpack Navigation Graph for a Fragment that can be accessible by any Fragment in the Graph?
Given I have a Jetpack Navigation Graph as below, where by
BlankFragment1 -> BlankFragment2 -> BlankFragment3 -> BlankFragment4 -> BlankFragment5

Elye
- 53,639
- 54
- 212
- 474
0
votes
1 answer
How to hide NavController & AppBarConfiguration in a fragment & activity
I'm using a navigation graph in my Android app (Java) and have set up a NavController & AppBarConfiguration in my home activity. This is how I have it set up:
public class Activity extends BaseActivity {
NavController navController;
private…

Iam Me
- 33
- 8
0
votes
1 answer
Fragment is not getting popped using navigation graph
I am building an app where first time it opens fragment1 to get user details and once user forwards to next fragment2, I am saving the details and setting a boolean variable isUserRegistered to true in SharedPreferences so that when the user opens…

Ashish Joshi
- 15
- 7
0
votes
0 answers
How to replace ChildFragmentManager with Navigation Graph in Android
I'm working on nested fragment scenario where I'm using a fragment with BottomNavigationView and inside that main fragment I need to load new fragments and these new fragments should replace more fragments within main fragment what contains…

Anshul Tyagi
- 2,076
- 4
- 34
- 65
0
votes
0 answers
How to replace fragments using NavigationGraph in NestedFragments
Below I have mentioned a hierarchy of multiple nested fragments where I need to replace and add new fragments as child fragments. So I have completed to show BottomNavigationView but whenever I tried to load a fragment inside that I face…

Anshul Tyagi
- 2,076
- 4
- 34
- 65
0
votes
1 answer
How to handle Navigation Graph in Nested Fragment of Android
I'm using BottomNavigationView in a fragment and want to show different fragments on tap of each option og that. I'm able to see BottomNavigationView but I'm unable to load any fragment. I'm using below code for…

Anshul Tyagi
- 2,076
- 4
- 34
- 65
0
votes
0 answers
NavGraph with dynamic destinations - restore after process kill
This is the setup:
View-based Android UI
Using androidx.navigation library (tested with versions 2.4.1 and 2.5.0-beta01)
Activity, consisting of a bottom bar and a NavHostFragment
What's special is that the navigation structure is defined by the…

Peter F
- 3,633
- 3
- 33
- 45
0
votes
1 answer
Type mismatch: inferred type is Array but Array<(out) Parcelable!>? was expected Navigation graph
I am trying to pass an ArrayList in a bundle from one fragment to another using the Navigation Graph, but I am getting this error Type mismatch: inferred type is Array but Array<(out) Parcelable!>? was expected I have already…

Tony
- 159
- 1
- 11
0
votes
1 answer
How do I switch between fragments?
I have 3 fragments and I am controlling them with a nav_graph. The first one is listingEvents, the second one is listingItemsOfEvents and the last one is updateListing items.
When I update items and click "Update" button, It goes…
0
votes
1 answer
Android Navigation Components Error: 'bad operand types for binary operator' in generated file
I am working on an app that incorporates Android Navigation Components. A generated build file MyFragmentDirections.javais preventing the app from being built, this file contains numerous errors similar to the ones below:
error: bad operand types…

John Harrington
- 1,314
- 12
- 36
0
votes
2 answers
Navigation graph with viewpager2 android
My viewpager consists of 2 fragments which are displayed correctly and working fine.
From viewpager's fragment I want to move to another fragment via navigation graph
This is my graph

WISHY
- 11,067
- 25
- 105
- 197
0
votes
1 answer
How To Make Destination of Android Navigation Component Inflated in Different Destinations Not Be Edited as If They Were Shared Instances?
SCENARIO:
I use BottomNavigationView component on my app setup with Android Navigation Component. It's a Social Network app with Home, Feed, Challenges, Map and Profile as main destinations of the app. There are 2 destinations (destination_feed and…

John Santos
- 485
- 4
- 18