Questions tagged [navgraph]

29 questions
2
votes
0 answers

can we combine multiple activities in single navGraph ? if yes then How we can use multiple activities in single Navgraph?

How to use multiple activities in single Nav graph ? is it possible to use multiple activities in single NavGraph.
Manisha
  • 231
  • 1
  • 3
  • 12
2
votes
2 answers

Start activity with either of two fragments

I have an activity and used a navgraph to navigate through three fragments. This goes from Fragment1 to Fragment2 to Fragment3 and it works. However, from Fragment3 I start a new activity. In this activity, I want to display either of two fragments…
Benjamin Basmaci
  • 2,247
  • 2
  • 25
  • 46
1
vote
0 answers

How to add Transition animation in android jetpack Compose Destination library?

I have started learning Android Jetpack Compose and I come across Compose Destination library which is the best for navigation. But now I am stuck on the navigation transition part where I want to make use of the…
1
vote
0 answers

IllegalStateException: Restore State failed: destination Fragment2 cannot be found from the current destination Fragment4

I am using the Jetpack Navigation library, Graph A is a graph similar to Login, where Graph B is the main content containing a BottomNavigationView, the problem occurs in one scenario only. User is shown Graph A upon opening application. After some…
babybadger
  • 101
  • 3
1
vote
1 answer

Difference between Navigating one fragment to another using fragment id and action id using nav graph in android jetpack library

I am using jetpack navigation graph in my android project. Normally to navigate one to another fragment we connect a link between them in nav graph and call like this …
Tausif
  • 778
  • 1
  • 5
  • 14
1
vote
2 answers

Android navigation component & Bottom nav view - Hard back button goes back to "Home" with non-saved state

Context We're migrating to use the nav component in my company, and its going ok so far. We have a bottom navigation view with 5 tabs, and using the NavigationUI to set it up. We have "Home" as the start destination tab for our nav graph. Using…
1
vote
1 answer

How to navigate from DialogFragment to DialogFragment?

I have a fragment where I click a button and it opens a dialog(DialogFragment). In this dialog, i have a button that if I press it, I want to dismiss this dialog and open another different dialog(DialogFragment). In this new dialog I want to do…
HeraGonz
  • 315
  • 1
  • 9
0
votes
0 answers

Serializable Data Class not able to be used as nav_graph argument

I'm having an issue with passing a JSON object (my data class) as an argument to be shown as information in another fragment. I have a Data Class set up as @Serializable that should be passing ALL of its information through an argument to the next…
0
votes
0 answers

Pass items from recycleView to another recycleView in Kotlin

I am newbie Kotlin programmer. I used Notes tutorial to create a recycle view with add button. In this tutorial he used MVVM pattern design. (model,ViewModel,Repository, and Firebse) NavGraph also used. My Goal of this app is to start my own…
Abdul
  • 57
  • 1
  • 10
0
votes
1 answer

Can not find NavController set

I am trying to navigate between fragments, however when I try view.findNavController in the host fragment (login fragment) inside onViewCreated I face this error: java.lang.IllegalStateException: View android.widget.ScrollView{f13c4b8 VFED.V...…
0
votes
0 answers

How can navigate to a fragment from dialog fragment using navigation graph - Android

I have a dialog fragment and fragment and I am using navigation graph in the application, And for switching between fragments, I am using actions. So here, I want to direct a user to home screen when he clicks on 'OK' button from a popup (created by…
Aneesh NN
  • 113
  • 1
  • 9
0
votes
0 answers

passing optional arguments in compose navigation start destination?

I've been trying to send a destination with optional parameter to navigation start destination for 2 days, but I found out that this is not possible. The start destination of the navigation had to match the character-by-character route, so it had to…
0
votes
2 answers

Send call back to previous fragment with data using navigation graph

I am using navigation graph for the first time so need help regarding the same. In my application I have MainActivity with 5 nested graphs.
Sneha Bansal
  • 941
  • 1
  • 13
  • 38
0
votes
1 answer

Back Navigation Issue (Nav Graph) Issue (android)

I am stuck in this issue of back navigation button for long while, I have tried different methods but still the problem is not resolved Here is the IMAGE This is my issue So, I have a home screen where i am signing up and login the user If…
Jadu
  • 489
  • 3
  • 10
0
votes
0 answers

String value passed as default argument received as a number in fragment args

Value passed as String should be received as String Steps to reproduce:- Fragment needs to be added as startDestination in NavGraph Add a default argument in fragment of string type and default value that contains only digits 3a.If the value is…
1
2