ste
05/02/2021, 1:21 PMwidth(IntrinsicSize.Max) and animateContentSize intended to throw an exception (Can't represent a size of 2147483647 in Constraints)? Code in threadste
05/02/2021, 1:22 PM@Preview
@Composable
fun TestPreview() {
Column(modifier = Modifier.width(IntrinsicSize.Max)) {
TestElem(text = "Short Text", color = Color.LightGray)
TestElem(text = "Well, a medium Text", color = Color.Yellow)
TestElem(text = "A very very very very long Text", color = Color.Green)
}
}
@Composable
fun TestElem(text: String, color: Color) {
var isExpanded by remember { mutableStateOf(false) }
Column(modifier = Modifier
.animateContentSize()
.fillMaxWidth()
.background(color)
.clickable { isExpanded = !isExpanded }
) {
BasicText(text = text)
if (isExpanded) {
BasicText(text = "$text 2!")
}
}
}ste
05/02/2021, 1:25 PManimateContentSize :ste
05/02/2021, 1:27 PMwidth(IntrinsicSize.Max) , fillMaxWidth()ste
05/02/2021, 1:29 PMAnimatedVisibility instead of animateContentSize, it crashes (same error) on collapseZach Klippenstein (he/him) [MOD]
05/02/2021, 3:10 PMste
05/02/2021, 4:12 PMWalter Berggren
05/28/2021, 10:59 AMste
05/29/2021, 11:52 AMStylianos Gakis
10/03/2021, 6:13 PMAnimatedVisibility inside a row that has .height(IntrinsicSize.Min) . Was there a bug filled back then, or should I just create a new one now?Walter Berggren
10/03/2021, 7:17 PMStylianos Gakis
10/03/2021, 10:06 PMWalter Berggren
10/04/2021, 8:40 AM