Yes, you can remove the highlighting on a composable in a LazyRow by setting its background color to transparent. For example:
LazyRow {
items(10) { index ->
Box(
modifier = Modifier
.background(color = Color.Transparent)
.padding(16.dp)
) {
Text(text = "Item $index")
}
}
}
Here, the Box
composable has its background color set to transparent using Modifier.background(color = Color.Transparent)
, which removes the highlighting effect.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-07-19 21:10:05 +0000
Seen: 7 times
Last updated: Jul 19 '23