Working on a Jetpack Compose app with a BottomNavigationView
and Navigation component, I did the usual setup for the bottom bar inside the activity:
val navHostFragment =
supportFragmentManager.findFragmentById(R.id.nav_host_fragment) as NavHostFragment
val navController = navHostFragment.navController
navigationView.setupWithNavController(navController)
In each screen I am using a composable TopAppBar
.
Unfortunately, after adding the setupWithNavController
call, the TopAppBar
started flickering in all the navigation bar destinations (but not in deeper destinations).
How can I fix the flickering?
I got the same issue. What helped, to my surprise, was lowering androidx.navigation:navigation-compose version
to 2.4.0-alpha04
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With