Mohamed Elfiky
10/20/2020, 4:02 AMLayer is redrawn for LayoutNode in state NeedsRelayout
?Andrey Kulikov
10/20/2020, 2:34 PMMohamed Elfiky
10/20/2020, 3:53 PM@Composable
fun Test() {
val state = rememberLazyListState()
val selectedIndex = if (state.firstVisibleItemScrollOffset > 120) {
state.firstVisibleItemIndex + 1
} else {
state.firstVisibleItemIndex
}.coerceIn(0, 9)
LazyRowForIndexed(
items = (0..10).toList(),
state = state,
) { index, item ->
Card(
modifier = Modifier
.padding(horizontal = 4.dp, vertical = 16.dp)
.width(
animate(target = if (selectedIndex == index) 200.dp else 100.dp)
)
.height(120.dp),
) {
val imageId = when(index % 3) {
0 -> R.drawable.surffing_1
1 -> R.drawable.surrfing_2
else -> R.drawable.surffing_3
}
Image(
asset = imageResource(id = imageId),
contentScale = ContentScale.Crop
)
}
}
}
when i remove the Image no crashes happens. should i file a bug?Andrey Kulikov
10/20/2020, 4:37 PMMohamed Elfiky
10/20/2020, 4:37 PMAndrey Kulikov
10/20/2020, 5:01 PMMohamed Elfiky
10/20/2020, 5:03 PMAndrey Kulikov
10/20/2020, 5:18 PMVincent tiensi
11/06/2020, 3:30 AMLayer is redrawn for LayoutNode in state NeedsRelayout [LayoutNode@80444f4 children: 0 measureBlocks: MeasuringIntrinsicsMeasureBlocks@f8be41d{ measureBlock=androidx.compose.foundation.ImageKt$Image$1$1@97f2692 }]
. It may possibly be image related, I haven’t looked to deeply into it but it happens intermittently as my list paginates.Andrey Kulikov
11/06/2020, 11:07 AMVincent tiensi
11/09/2020, 12:15 AM1.0.0-alpha06
Alexjlockwood
11/15/2020, 1:58 AMJulianK
11/30/2020, 12:37 PMAndrey Kulikov
11/30/2020, 1:25 PMallan.conda
12/01/2020, 12:03 PMLayer is redrawn for LayoutNode in state NeedsRemeasureIs this the same issue with same fix?
Andrey Kulikov
12/01/2020, 12:25 PMallan.conda
12/01/2020, 12:26 PM