1

I have a MainActivity with BottomNavigation and a frameLayout. The BottomNavigation can navigate to three different fragments. But when i press the back button, the checked Item on my bottom nav does not check the correct menu item. How do i solve this problem? It's been bugging me for days now

Ebenezer Mathebula
  • 271
  • 1
  • 5
  • 19

1 Answers1

1

Better try to use NavHostFragment the newest way of Navigation -https://developer.android.com/guide/navigation. and you will not face this issue.

Refer this - https://stackoverflow.com/a/50626510/10735178

Askar
  • 247
  • 2
  • 9