Код: Выделить всё
Box(
modifier = Modifier
.background(
color = if (entry == chartDataType) Color.White else Color.Transparent,
shape = RoundedCornerShape(4.dp)
)
.clickable {
callBack?.invoke(entry)
}
.padding(4.dp)
.testTag(entry.name)
) {
Text(
text = stringResource(id = entry.sourceValue), lineHeight = 1.54.em,
style = TextStyle(
fontSize = 13.sp
), color = if (entry == something) Color(0xFF474D56) else Color(0xFF8C8C8C)
)
}
Подробнее здесь: https://stackoverflow.com/questions/786 ... background
Мобильная версия