muthuraj
04/18/2023, 7:53 PMmuthuraj
04/18/2023, 8:50 PMHorizontalPager
and setting beyondBoundsPageCount
as 4.
But now all 4 tabs are being composed instantly, I need to check if there is a way to delay creating composables until the corresponding bottom nav item is clicked.dorche
04/18/2023, 9:13 PMnavController.navigate(screen.route) {
// Pop up to the start destination of the graph to
// avoid building up a large stack of destinations
// on the back stack as users select items
popUpTo(navController.graph.findStartDestination().id) {
saveState = true
}
// Avoid multiple copies of the same destination when
// reselecting the same item
launchSingleTop = true
// Restore state when reselecting a previously selected item
restoreState = true
}
sounds a lot like what you wantmuthuraj
04/19/2023, 8:51 AM