Closed jminie-o8o closed 2 years ago
val navHostFragment = findNavController(R.id.nav_main_event_fragment) as NavHostFragment
val navController = navHostFragment.navController
binding.bottomNavigationView.setupWithNavController(navController)
val navController = supportFragmentManager.findFragmentById(R.id.nav_main_event_fragment)?.findNavController()
navController?.let {
binding.bottomNavigationView.setupWithNavController(it)
}
수정 된 코드가 되는 이유 : navController 를 가져올때는 supportFragmentManager를 사용해야만 한다.
🖋 Description
📖 Progress