Reputation: 115
ModalNavigationDrawer(
drawerState = drawerState,
drawerContent = {
ModalDrawerSheet(
drawerShape = RectangleShape,
drawerTonalElevation = 4.dp,
drawerContainerColor = White,
drawerContentColor = secondaryColor,
content = {
NavigationDrawerItem(
label = { drawerNavItems[0].title },
selected = true,
onClick = { },
icon = {
Image(painter = painterResource(drawerNavItems[0].id), contentDescription = "")
})
}
)
},
gesturesEnabled = true,
content = {
Scaffold(
content = {
scope.launch {
drawerState.open()
}
}
)
}
)
Later i have this
content = {
Column(
modifier = Modifier
.fillMaxSize()
.background(Color(0xff8d6e63)),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
CreateAlbum(albumViewModel, it)
}
}
when i comment the above code the content appears but doesn't when i uncomment it. And the drawer is by default open even when i used DrawerValue.Closed.
I tried debugging into CreateAlbum compose and it is going there.
Upvotes: 1
Views: 388