T
T
terminator-light2019-08-08 19:40:27
Java
terminator-light, 2019-08-08 19:40:27

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

2 answer(s)
T
terminator-light, 2019-08-10
@terminator-light

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);

I
illuzor, 2019-08-08
@iLLuzor

Deeplinks .
In general, I do not see any problems with prescribing transitions from each element.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question