1

I am new to Navigation components. Currently working with an app which has both Drawer layout and BottomNavigationView. I have 3 tabs in BottomNavigaionView and 4 menu items in drawer. Each tab of BottomNavigationView and Drawer open a defferent fragment. With the following flow:

1. Select 2nd tab of BottomNavigationView.

2. Select item from Drawer. Which opens a fragment.

3. Back button to go back to MainActivity.

Now instead of 2nd tab selection, 1st tab is selected. If I open a fragment from 2nd tab and then press back button to go back to MainActivity. Everything works fine and 2nd tab is selected.

Is there any way to get the same behavior when I change fragment using drawer? Thanks in advance.

Piscean
  • 3,069
  • 12
  • 47
  • 96

0 Answers0