Skip to content

Instantly share code, notes, and snippets.

@ifucolo
Last active August 22, 2025 09:19
Show Gist options
  • Select an option

  • Save ifucolo/1191d452ad7e1fea3ea9c01234f001a3 to your computer and use it in GitHub Desktop.

Select an option

Save ifucolo/1191d452ad7e1fea3ea9c01234f001a3 to your computer and use it in GitHub Desktop.
setupBottomNavigationBar.kt
private fun setupBottomNavigationBar() {
val bottomNavigationView = findViewById<BottomNavigationView>(R.id.bottom_nav)
val navGraphIds = listOf(
R.navigation.nav_graph_home,
R.navigation.nav_graph_prayers,
R.navigation.nav_graph_plans,
R.navigation.nav_grapsh_user
)
val controller = bottomNavigationView.setupWithNavController(
navGraphIds = navGraphIds,
fragmentManager = supportFragmentManager,
containerId = R.id.nav_host_container,
intent = intent
)
currentNavController = controller
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment