Reputation: 11
I have a problem with navigation, I want the user to have lists of projects displayed at the beginning. After switching to a certain project, he could call ModalNavigationDrawer and there he already went to various tabs. If I add ModalNavigationDrawer, at first it may appear when touched, but I do not need it, tell me how to add ModalNavigationDrawer after switching to the project, and so that you can already go to various tabs there.
val navController = rememberNavController()
val drawerState = rememberDrawerState(initialValue = DrawerValue.Closed)
val scope = rememberCoroutineScope()
ModalNavigationDrawer(
drawerState = drawerState,
drawerContent = {
DrawerSheet(scope = scope, navController = navController, drawerState = drawerState)
},
gesturesEnabled = false
) {
Nav(navController = navController, scope = scope, drawerState = drawerState
)
}
}
Or how to make it so that when touched, it does not slide out when the user is in the project selection, but slides out when touched, only when the user has failed in the project
val navController = rememberNavController()
val drawerState = rememberDrawerState(initialValue = DrawerValue.Closed)
val scope = rememberCoroutineScope()
ModalNavigationDrawer(
drawerState = drawerState,
drawerContent = {
DrawerSheet(scope = scope, navController = navController, drawerState = drawerState)
},
gesturesEnabled = false
) {
Nav(navController = navController)
, scope = scope, drawerState = drawerState
)
}
}
Upvotes: 0
Views: 76