【发布时间】:2020-12-28 05:04:28
【问题描述】:
我已经成功创建了一个bottomNavigation,但是当我执行我的代码时它似乎在顶部而不是在屏幕底部,我需要做其他事情吗?
@Composable
fun BottomNavWithLabels(){
BottomNavigation(content = {
listItems.forEachIndexed { index, label ->
BottomNavigationItem(
icon = {
Icon(vectorResource(id = R.drawable.ic_baseline_home_24))
)
}
})
}
【问题讨论】:
-
可以分享一下布局代码吗?
-
这是布局代码,是jetpack compose
标签: android android-studio kotlin android-jetpack-compose