Questions tagged [android-navigation-graph]

303 questions
3
votes
1 answer

How to change the defaultNavHost among a few already created fragments?

I have a couple of fragments in my activity, each having their own Navigation Graph, they're created when the activity is created. What I want to know is how can I choose any of them to be the defaultNavHost or the PrimaryNavigationFragment after…
SIMMORSAL
  • 1,402
  • 1
  • 16
  • 32
3
votes
0 answers

Opening up a fragment in full screen from a child fragment(Non Full screen) using Android Navigation Component

Here is my design requirement my first screen is an activity which contains a Fragment(Non-Fullscreen) on clicking a filter icon in a fragment(Non-Full screen), I want to navigate to filter fragment(Fullscreen) without communicating with an…
3
votes
1 answer

Add enter animation to start destination in android navigation component

I know how to add enter and exit animation in action tag in nav graph. I also know how to dynamically add animation using NavOptions when navigating with navController. I want to know how can we add enter animation for StartDestination in nav graph.…
3
votes
2 answers

How to show HomeAsUp when use Android navigation graph

I have a problem to show HomeAsUp . I think there is such as a way to link NavColtroller with ActionBar. so I don't need to adjust Toolbar manually for each Fragment, mainly when use inclusive return to previous screen.
2
votes
2 answers

Android bottom navigation not changing destination

I was trying to implement a simple bottom navigation view using android's navigation, but I think I'm missing a step. Here's what I did: At first I created four fragments. These fragments contain only a text view. Then I created a navigation graph.…
2
votes
1 answer

Android Studio navigation graph visualization export

I want to use the Navigation graph diagram in the project wiki. For that, I'm trying to find a way to export the Navigation graph visualization from Navigation Editor in Android Studio. Maybe is there a way to export it in PNG image, Vector or PDF…
2
votes
1 answer

how to make action from included graph?

I can make action from nested graph to any destination, but apprently I can't make action from included other file. i thought included graph and nested graph is almost same. how can I make action from included graph?
2
votes
3 answers

Resetting the NavGraph after activity recreates

I've a navigation graph with 2 fragments, Fragment A and Fragment B. Fragment A is my start destination. If I'm in Fragment B and I open the app settings, and revoke a permission I see that: activity is recreated, but I don't see onDestory is…
2
votes
0 answers

Android navigation component with bottom navigation crash if navigate after pop back stack

I have a main nav graph with included subgraphs to provide multiple back stacks with bottom navigation view. It works, graphs ids are consistent with the bottom menu items id. The main problems arise when I try to pop a back stack on the reselect…
2
votes
2 answers

navigate from main activity to fragment

Im using navgraph to navigate between fragments. Now, i implemet notifications in my app, so, when i click on the notification im goingo to the MainActivity with pending intent. In the MainActivity I verify if the user is loged in, and manage the…
2
votes
2 answers

Deeplinks with Query Params with nav component in android

I have implemented deep linking for my application. And I am handling my deep links by navController.handleDeepLink(intent) It's working fine in normal cases. The issue is when I have deep links like this: https://example.com/list It should take…
2
votes
3 answers

calling findNavController().popBackStack() does not resume previous fragment on stack

I just set up a projet with Android navigation component and here's the structure of my graph:
2
votes
1 answer

multi navGraph BottomNavigationView in navigation 2.4.0

I have 3 tabs A, B, C in BottomNavigationView and each has a nav graph. I can do what I want perfectly in navigation 2.3.3 by a complicated navigation extension, just like the old architecture-components-samples. This sample is now upgrade to 2.4.0.…
Krahmal
  • 195
  • 13
2
votes
1 answer

NavDirections arguments in wrong order

I'm using the Android Jetpack Navigation component, and it seems like it's requiring that I pass the arguments in the wrong order. I have two fragments (fragment1 and fragment2). Fragment 2 takes four arguments (bool, string, int,…
2
votes
0 answers

Navigating multi-module App with nested fragments

I'm trying to implement a multi-module app structure with navigation between modules. The challenge Im having is doing this with a structure that contains nested fragment containers. Background: The design uses a single activity.The main activity…
Cameron
  • 67
  • 5