Questions tagged [android-navigation-graph]
303 questions
0
votes
0 answers
Android Deeplink not working from notification
I'm attempting to trigger a specific tab to open with some data on notification press. The way the notification is setup is it open the root page if the user clicks the notification itself and a specific page if they click a button on the…

CubanAzcuy
- 125
- 1
- 13
0
votes
1 answer
Android Navigation Safe Args Pass LiveData and Lambda Variable
I have two questions for a simple Fragment A -> Fragment B graph:
Can I pass LiveData using safe args? If not, how can I listen the value changes in Fragment B from Fragment A?
Can I pass lambda varible (function) using safe args (to act like a…

Sam Chen
- 7,597
- 2
- 40
- 73
0
votes
1 answer
Issue with the Navigation Click Handler - JETPACK - KOTLIN
I am using the Navigation functionality of the JetPack library.
Included Two Fragments in Navigation Graph.
Have to navigate from TitleFragment to GameFragment with the click of the button which is inside TitleFragment.
I have done as below inside…

Jaimin Modi
- 1,530
- 4
- 20
- 72
0
votes
0 answers
How to restore fragment when backpressed
I'm using navgraph with some fragments Fragment A --> Fragment B --> Fragment C as the navigation. When I navigate from Fragment A to Fragment B and press back, I see onCreateView and then onViewCreated is called again in the Fragment A which…

maheshgupta024
- 7,657
- 3
- 20
- 18
0
votes
0 answers
Fragment layout not showing after opening through bottom sheet
I am using navigation component to work with lets say fragmentA, bottom sheet(dialog), fragmentB.
fragmentA has a button which opens bottom sheet, and bottom sheet also has a button which will open fragmentB.
Now as I am using navigation component,…

Vinay Kharayat
- 87
- 2
- 9
0
votes
1 answer
How do you pass data to a start Fragment from a destination Fragment's FloatingActionButton's OnClickListener when using a NavController?
I am trying to pass data from a destination Fragment's FloatingActionButton's OnClickListener to a start Fragment while using a NavController. The FloatingActionButton is in the Activity hosting all the Fragments.
Currently, I can return to the…

John Glen
- 771
- 7
- 24
0
votes
2 answers
Onbackpress using navigation graph
I have 5 fragment as follows:
But I want when I am on 5th fragment, when I press back button it returns to 2nd fragment. So how do I do it while I use navigation graph

Thang
- 409
- 1
- 6
- 17
0
votes
0 answers
How display toast when back button of navigation graph clicked
In the fragment whenever I click the back button of the provided in navigation Graph the application crashes.
what I really want to implement is to display a dialog box that will say yes then will move to the previous fragment and if it says no then…

Garvit
- 94
- 11
0
votes
0 answers
To many arguments when using android navigation safeArgs
i am creating navigation graph in android, and i give args for the destination, but when I called the function, it was saying too many arguments.
already setup on build.gradle (app) apply plugin: 'androidx.navigation.safeargs'
already setup on…

ridhopratama
- 47
- 1
- 10
0
votes
1 answer
Android Navigation Component navigate to previous fragment
I am using Navigation Component to navigate through pages in my app.
I have a ProfileFragment and users might navigate to this fragment from different fragments(like HomeFragment, ArticleFragment, and ...).
In my ProfileFragment how should I know…

Hossein Mirzazadeh
- 16
- 2
- 14
0
votes
0 answers
NavigationUI.navigateUp does nothing
I have an Activity, where I have a fragment, in which I have referenced a Navigation Graph component:
activity XML:

Sparker0i
- 1,787
- 4
- 35
- 60
0
votes
1 answer
Tap on notification to open app destination with Navigation component, incorrect destination
I am trying to open a specific destination in my navigation graph from a tap on notification. I created Pending Intent as follows-
//this code in service to create notification
OccasionViewerArgs.Builder builderArg = new…

Nikhil Sharma
- 897
- 1
- 4
- 18
0
votes
1 answer
Login to BottomNav
The app I'm developing is going to start with a login, which will be two different screens. After successfully logging in, the user will be redirected to a screen that will have a bottom navigation.
What is the "proper" way of going about this? …

user1795832
- 2,080
- 8
- 29
- 50
0
votes
0 answers
NavDeepLinkBuilder arguments bundle not received in destination fragment
I have 2 nav host activities Activity A and Activity B with each their own set of navigation graphs. I want to navigate from FragmentA which is in a nav graph hosted by Activity A to FragmentB which is in a nav graph hosted by Activity B to…

Macs
- 197
- 2
- 15
0
votes
1 answer
Problem going back from current Fragment back to the replaced Fragment when using NavHostFragment
I have three fragments A, B and C. And I'm using navHostFragment container in MainActivity. So the application goes from A -> B using kotlin extension function findNavController().navigate... and then go from B to C using same function. All works…

Umair
- 400
- 5
- 19