Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Thanks for filing the issue.
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
Description
Run the snippet below, click on a couple of items and scroll
Observed behavior: When items (that reused the LayoutNode and concequently the modifier node for animateContentSize) are brought into the viewport for the first time, they animate to their initial size.
Expected bahvior: No animation for initial size
```
@Preview
@Composable
fun LazyColumnWithAnimatedContentSize() {
LazyColumn {
repeat(30) {
item { MyText() }
}
}
}
@Composable
private fun MyText() {
val shortText = "Click me"
val longText = "Very long text\nthat spans across\nmultiple lines"
var short by remember { mutableStateOf(true) }
Box(
modifier = Modifier
.background(
Color.Blue,
RoundedCornerShape(15.dp)
)
.clickable { short = !short }
.padding(20.dp)
.wrapContentSize()
.animateContentSize { startSize, endSize -> println("$startSize -> $endSize") }
) {
Text(
if (short) {
shortText
} else {
longText
},
style = LocalTextStyle.current.copy(color = Color.White)
)
}
}
```