Answer the question
In order to leave comments, you need to log in
How to get from all fragments to another one in the Navigation Architecture Component?
Let's say there are fragments A, B, C, D, X. I need to get from any of (A, B, C, D) to X. I won't write all this in the nav graph, is there another way to achieve this? After all, they somehow implemented this for the NavigationView
Answer the question
In order to leave comments, you need to log in
Everything turned out to be painfully simple, no deep links:
Bundle bundle = new Bundle();
bundle.putInt("screen_id", screenId);
bundle.putInt("screen_title", screenTitleResource);
navController.navigate(R.id.infoFragment, bundle);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question