Hy Everyone! I'm using Coil 1.4.0 to load an imag...
# compose
i
Hy Everyone! I'm using Coil 1.4.0 to load an image in the following example:
Copy code
@Composable
fun TestScreen() {
    Column(
        modifier = Modifier
            .fillMaxSize(),
        horizontalAlignment = Alignment.CenterHorizontally
    ) {
        Image(
            painter = rememberImagePainter("<https://cdn.vox-cdn.com/uploads/chorus_image/image/47684009/Screenshot_2014-07-19_15.24.57.0.png>"),
            contentDescription = null,
            modifier = Modifier
                .fillMaxHeight(0.4f)
        )
        Button(onClick = { }) { }
    }
}
If I add a
.verticalScroll(rememberScrollState())
modifier to the
Column
the image doesn't show up anymore, only the button. What am I doing wrong or what do I miss?
t
verticalScroll causes the column to be measured with infinite maxHeight constraints, so you'll need to find another way to set a constraint on the image
i
Thanks for the explanation! For the record: I switched to the 2.0.0-alpha05 version and that solves the issue.
t
Yeah, not requiring fixed constraints is the better solution.