Вот как код выглядит так:
Код: Выделить всё
@Composable
private fun BottomNavigationBar() {
var selectedItem by remember { mutableIntStateOf(0) }
NavigationBar(
modifier = Modifier
.fillMaxWidth()
.height(96.dp)
.padding(top = 26.dp)
.border(
width = 1.dp,
color = Color(0xFFE5E5E5),
),
containerColor = Color.White,
) {
navigationItems.forEachIndexed { index, item ->
if (item is NavigationItem.Guide) {
NavigationBarItem(
modifier = Modifier
.width(74.dp)
.height(82.dp)
.offset(y = (-20).dp),
selected = selectedItem == index,
onClick = { selectedItem = index },
icon = {
Image(
modifier = Modifier
.size(60.dp),
painter = painterResource(id = R.drawable.ic_nav_guide),
contentDescription = ""
)
},
label = { Text(text = item.title ?: "") }
)
} else {
NavigationBarItem(
selected = selectedItem == index,
onClick = { selectedItem = index },
icon = {
Icon(
painter = painterResource(id = item.icon ?: 0),
contentDescription = "Nav Icon"
)
},
label = { Text(text = item.title ?: "") }
)
}
}
}
}

а вот так оно выглядит на самом деле.
Как исправить обрезку изображения, чтобы одна половина отображалась поверх панели навигации, а другая половина внутри?
Подробнее здесь: https://stackoverflow.com/questions/784 ... gation-bar