Questions tagged [android-navigation-graph]
303 questions
9
votes
1 answer
Defining a NavHostFragment inside another fragment
I have a fragment that I define a NavHostFragment inside it like this:

Shalan93
- 774
- 1
- 7
- 20
8
votes
1 answer
Is it possible to pass Parcelable object via Navigation component deeplink?
I use navigation component and use deep link for passing the value or changing page I can pass primitive and enum objects I never try passing Parcelable object via deep link is it possible?

a-rohim
- 506
- 1
- 5
- 19
7
votes
1 answer
Views added to a FragmentContainerView must be associated with a Fragment
Due to difficulties with the implementation of the back button in the toolbar between two fragments, I decided to start acquaintance with Navigation Graph. But I get an error
Views added to a FragmentContainerView must be associated with a Fragment.…

MaxB
- 635
- 1
- 9
- 22
7
votes
5 answers
Android Navigation Component Activity Intent Flags
I have created a navigation action from a fragment to an activity, but I have no way of clearing the back stack. When I execute the navigation action from my fragment to my new activity, and I press the back button, I am taken back to the previous…

Pop-A-Stash
- 6,572
- 5
- 28
- 54
6
votes
1 answer
Problem with Android Navigation: Multiple back stacks
My problem is when I try to change the fragment with the bottom navigation it works except in one case. I have 5 fragments, when I enter in the 3rd and after go to the 5th, the icon of the 5th don´t change it color. After that when I do another…

Gray
- 81
- 4
6
votes
1 answer
Deep linking from Notification - how to pass data back up through the backstack?
In my app, the user can select a category, then select an item within that category to finally view the item details. The standard/forward flow is:
SelectCategoryFragment -> SelectItemFragment -> ViewItemDetailsFragment
On selecting a category,…

ban-geoengineering
- 18,324
- 27
- 171
- 253
6
votes
1 answer
Navigate with BottomNavigationView inside fragment (not activity) using navigation component and navigation graph
I have a single Activity application. I created a single Navigation graph containing all the possible destinations (Fragment).
The Activity layout only contains a container as it should be.
There is a main Fragment containing a…

Francky380
- 233
- 1
- 12
6
votes
1 answer
Why does args classes not generating for navigation graph fragments?
I am using navigation-components in my android project.I have enabled Gradle's type safe args plugin here is my build.gradle(app) file.
apply plugin: 'com.android.application'
apply plugin: "androidx.navigation.safeargs"
apply plugin:…

Mr U9Q
- 111
- 6
6
votes
1 answer
Navigation drawer with Navigation graph is not working
I tried by creating a new project with Navigation drawer activity. Got autogenerated fragments with viewmodels. On clicking on the nav menu, it's not navigating to respective fragments.
build.gradle
dependencies {
implementation fileTree(dir:…

Shahal
- 1,008
- 1
- 11
- 29
5
votes
1 answer
using setupWithNavController:2.5.0-alpha01 caused to OnViewCreated called every time
I use the navigation component and bottom navigation bar and for handling the tab bar navigation, call the below code
binding.bottomNavigationView.setupWithNavController(navController)
Before the last version, I had a big problem saving the states…

imansdn
- 968
- 1
- 7
- 17
5
votes
1 answer
ClassNotFoundException in navigation graph android
I saw this crash over firebase and it is not reporducible in the emulator of same OS.
Not sure what is causing it. Crash is occuring in samsung M32 OS 11.
The crash is
Caused by java.lang.RuntimeException: java.lang.ClassNotFoundException:…

WISHY
- 11,067
- 25
- 105
- 197
5
votes
3 answers
Too many arguments for public final fun actionFragmentAToDetailActivity()
Actually DetailActivity(need to pass arguments) is present in Library module and I need to launch it from app (FragmentA) but I am getting Build error as follows:
Too many arguments for public final fun actionFragmentAToDetailActivity()
I am using…

abhishek kumar gupta
- 2,189
- 6
- 35
- 56
5
votes
3 answers
Supporting both implicit and explicit deep linking with Navigation Component
I am using the Navigation Component and I am trying to trigger an explicit deep linking to a specific destination, represented by a Fragment, when the user taps on a notification.
According to the documentation a pending intent can be create like…

GVillani82
- 17,196
- 30
- 105
- 172
5
votes
0 answers
How to send data back from Activity to Activity with Navigation Component
I know Navigation Component is ideally designed to be used in one-single-activity app. However, Android allows now add items within a NavGraph. My app is kind of following the one-single-act pattern, but there is a moment where FragmentA…

mantc_sdr
- 451
- 3
- 17
5
votes
3 answers
Error inflating class Fragment, when adding navGraph attribute
I know there are a few questions and answers about this problem, but none of the solutions fixed my problem. I get an
android.view.InflateException: Binary XML file line #11: Binary XML file line #11: Error inflating class fragment
error, when I…

Malmatth
- 197
- 2
- 12