With the Navigation component, BottomNavigationView is connected to the NavController using:

  1. addToBackStack()
  2. setupWithNavController()
  3. replace()
  4. startActivity()
Answer

B) setupWithNavController()

setupWithNavController links menu item IDs to nav graph destinations.

Computer Science MCQ · More Lab: Bottom Navigation with Fragments MCQs · Practise