2 years ago

#56305

test-img

Grigoriym

How to use navigation component with a parent fragment?

I have an app, which is a single-activity app. I use dagger2 for di, and an abstraction for navigation. Let's see a navigation flow: auth - select-info (A, B) - menu. As you can see, there are three main destinations, and the second one contains two screens. I want to make "select-info" as a parent fragment for A and B, but the way navigation component works, I cannot implement that behavior. I tried to google it, but something close to this issue is an approach to use fragmenManager to go to parentFragment and internally use navComponent, but this approach does not work in my case, because somehow I need to change a navGraph.

As an alternative I see using viewPager in "select-info".

android

android-architecture-navigation

android-navigation

0 Answers

Your Answer

Accepted video resources