https://kotlinlang.org logo
Title
u

user

07/04/2022, 2:11 PM
Jetpack Compose set image height before loading remote image I have a list of dynamically sized images. I already know the size of the images in pixels. I would like to place a placeholder of the same remote image dimension before the image is loaded just so that while scrolling in the LazyColumn the list doesn't jump up and down Given the following code, which uses Coil: @Composable fun CloudImage( url: String, modifier: Modifier = Modifier, imageHeight: Int // I also got the image width... but I am using ContentScale = Fit ) { AsyncImage(...