Alexander Karkossa
05/30/2021, 8:37 PMcompose 1.0.0-beta07
various items disappear when scrolling in LazyColumn
. I could reproduce the problem in a minimal example by inserting a Box
inside a LazyColumn
between AnimatedVisibility
and the actual Card
(the same happens with e.g. Column
). Example in my answerAlexander Karkossa
05/30/2021, 8:38 PMval items = listOf(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30)
Surface(modifier = Modifier.fillMaxSize()) {
LazyColumn {
items(
items
) { item ->
AnimatedVisibility(
visible = true
) {
Box { //FIXME Remove this one and no item will disappear
Card(
modifier = Modifier
.requiredHeight(250.dp)
.fillMaxWidth(),
backgroundColor = Color(
red = 0x00,
green = 0x00,
blue = (item / 30f * 0xFF).toInt()
),
shape = RoundedCornerShape(20.dp),
) {
Text(text = "$item")
}
}
}
}
}
}
Alexander Karkossa
05/30/2021, 8:41 PMBox
Alexander Karkossa
05/30/2021, 8:41 PMBox
Kirill Grouchnikov
05/30/2021, 8:48 PMAlexander Karkossa
05/30/2021, 8:48 PMAlexander Karkossa
05/30/2021, 8:48 PM