Reputation: 6835
I have succefully made a bottomNavigation but when I execute my code it appears to be at the top instead as at the bottom of the screen, do I need to do something else?
@Composable
fun BottomNavWithLabels(){
BottomNavigation(content = {
listItems.forEachIndexed { index, label ->
BottomNavigationItem(
icon = {
Icon(vectorResource(id = R.drawable.ic_baseline_home_24))
)
}
})
}
Upvotes: 1
Views: 108
Reputation: 364868
You can use your BottomNavWithLabels()
with a Scaffold
:
Scaffold(topBar = { },
bottomBar = {
BottomNavWithLabels()
},
bodyContent = {
//bodyContent()
})
Upvotes: 2