here is my bottom navigation controller setup
fun setUpBottomNavigation(){
nav_host_fragment=supportFragmentManager.findFragmentById(R.id.frag_container) as NavHostFragment
nav_controller=nav_host_fragment.navController
setUpActionBarConfiguration(nav_controller)
// manual handling of fragments aaa
binding!!.bottomNavView.setupWithNavController(nav_controller)
}
So, i think you are searching for this: