Lukasz Kalnik
01/23/2022, 9:36 PMColumn {
Image(
painter = rememberImagePainter(backdropImageUrl),
contentDescription = null,
contentScale = ContentScale.Crop,
modifier = Modifier.fillMaxWidth(),
)
}
However it doesn't render anything.
The only way to make it work is like this:
Column {
Image(
painter = rememberImagePainter(backdropImageUrl) {
size(OriginalSize)
},
contentDescription = null,
contentScale = ContentScale.Crop,
modifier = Modifier.fillMaxWidth(),
)
}
Is it correct? Can't Coil just automatically predict the size of the image based on the width (and calculate the height from it based on the aspect ratio)?
It is really a super basic use case, would be nice to have some sensible default behavior for it.Ian Lake
01/24/2022, 12:25 AMAsyncImage
is exactly what you need (since the limitation is specifically with how a painter
doesn't get measured at all in these cases)Colton Idle
01/24/2022, 8:56 AMLukasz Kalnik
01/24/2022, 10:16 AMColton Idle
01/24/2022, 4:10 PM