Questions tagged [navgraph]

29 questions
0
votes
0 answers

Android: Use com.github.appintro.AppIntro and navigation Graph together

Snapshot: I've got a project that is split up into multiple modules. I have a single Application app where fragments and functionality are split into different modules. Additionally to MainActivity I now have the AppIntro Activity. The module…
Franklin84
  • 463
  • 1
  • 6
  • 20
0
votes
0 answers

Navigation from fragment to activity resolves to the current activities graph

I have a navgraph with two activities and multiple fragments within them. Here is my graph
0
votes
1 answer

Some Navigation Graph Actions Are Not Resolved

I have multiple nav graphs in my projects each has multiple actions defined. Lately, I am getting this error while Building the app preventing me from generating APK Unresolved reference: action... This error appears in some actions only (4…
Abuzaid
  • 853
  • 8
  • 28
0
votes
1 answer

Unable to Redraw NavGraph Fragments Using setGraph()

How can I force Navigation Components to redraw the fragments inside a navGraph from scratch? I've tried using setGraph() with the same instance of the navGraph, but it only works the first time. The next time I call the same code with the same…
Andrew
  • 2,438
  • 1
  • 22
  • 35
0
votes
1 answer

NullPointerException: null cannot be cast to non-null type kotlin.Int. When calling navController.setGraph after restarting Activity

Sometimes, the setGraph function causes a NullPointerException: null cannot be cast to non-null type kotlin.Int. It depends on how I restart the application. When MainActivity is created, it programmatically sets the graph and start destination.…
0
votes
0 answers

how to navigate between different nav graph

I have two types of navigations for my mobile app - mobile navigation and search navigation. I am trying to move from the home fragment in the mobile navigation to the search fragment in the search navigation, but I am encountering an error. "…
0
votes
0 answers

create NavGraph programmatically that only includes other navGraphs

I am trying to build a navGraph programmatically and link it to a bottomNavigationView. I have to do it programmatically because I received the order of items and if they are visible from server. If i create a navGraph using xml, it works, but when…
0
votes
0 answers

How can I pass value to the primary Constructor of a fragment while going from another fragment using NavGraph

class FragmentA: Fragment() { fun changeFragment(activity: Activity, id: Int, b: Bundle) { findNavController( activity, R.id.nav_fragment_b ).navigate( id, b ) …
0
votes
2 answers

java.lang.IllegalArgumentException: Navigation action/destination

I'm building a notes application. I want to save the note when user press the back button from the createsNotesFragment and finish the createNotesFragment so that I can move to the homeFragment. The code I've used to do this is…
0
votes
1 answer

how to change the fragments using nav controller?

i am using navigation drawer with navigation components the problem i am facing is navigation is not working i have two fragments dashboard and profile but its not navigation to profile fragment. here is my code can someone help me out for this. val…
0
votes
0 answers

Android Toggle Button Text reverts to default when fragment called from back stack

I have a fragment, handled as part of a nav graph. Call it "Items Fragment" I have three toggle buttons in this fragment, and I set the togglebutton.text for each of them programmatically by accessing values stored in shared prefs when the fragment…
BrandonW
  • 11
  • 2
0
votes
0 answers

How to use Navigation graph for Activity?

As we all know navGraph contains fragments screen and strings(action) that connect two fragments, this navGraph can be hosted on NavHostFragment inside an activity XML. So in the same fashion can we navigate between activities?
0
votes
1 answer

How to call another navgraph fragment from another nav graph without lossing current destination in andorid

I have Two navgraph inside my project graphA { I have some fragments inside my ( Graph A ) login fragment ( this fragment set as home ) and signup fragment } graphB { I have some fragments inside my ( Graph B ) home ( this fragment set as home…
0
votes
2 answers

Android - NavGraph without a startDestination

How can I have a navGraph without a startDestination? I have a BottomSheet fragment container. When some events are triggered I want to expand this BottomSheet and load a fragment to its fragment container. Until one of those events are triggered I…
Anonymous
  • 4,470
  • 3
  • 36
  • 67
1
2