RS
вопрос был про bottomNavigationView.setupWithNavController(navController). А именно про то, что при тапе на один и тот же айтем - фрагмент пересоздается
Size: a a a
RS
AM
ЭМ
private fun NavController.navigateWithPop(
@IdRes screenId: Int,
args: Bundle? = null,
navOptions: NavOptions? = null
) {
val currentScreenId = currentDestination?.id
if (currentScreenId != screenId) {
if (popBackStack(screenId, false)) return
navigate(screenId, args, navOptions)
}
}
RS
private fun NavController.navigateWithPop(
@IdRes screenId: Int,
args: Bundle? = null,
navOptions: NavOptions? = null
) {
val currentScreenId = currentDestination?.id
if (currentScreenId != screenId) {
if (popBackStack(screenId, false)) return
navigate(screenId, args, navOptions)
}
}
K
ОА
ОА
ОА
ОА
ОА
Г
ОА
A
Sλ
ОА
Sλ
ОА
Sλ
ST