Enver Umerov
Enver Umerov

Reputation: 49

NavigationDrawer in one of the Fragments of MainActivity

I have an app that has one MainActivity with BottomNavigation which switches between three Fragments (Fragment 1, 2, 3) as shown in the picture.

enter image description here

In Fragment 3 I want to have a NavigationDrawer which can switch between 3 items, my question is how do I implement this? I've searched for a while but haven't found exactly my case explanation, though this design can be often found in many popular social apps. What should be the NavHostFragment, where do initialize NavController? And also, those 3 items should also be fragments?

Upvotes: 2

Views: 231

Answers (1)

Usman Zafer
Usman Zafer

Reputation: 1361

I have implemented the navigation Behavior in the following project that mimics your requirement

It should be a good starting point for you.

OUTPUT

enter image description here

GITHUB REPO https://github.com/usman14/NavigationComponent

Upvotes: 1

Related Questions