Hi! How do I stretch image to fill parent bound wi...
# compose
t
Hi! How do I stretch image to fill parent bound with accompanist coil? I’ve tried
scale(Scale.FILL)
but it didn’t work
c
Look at the
contentScale
parameter on
Image()
t
I’ve tried that but it still not filling the parent Here the sample code
Copy code
Box(modifier = Modifier
        .fillMaxWidth()
        .fillMaxHeight(.35f)
        .background(Color.Red)
    ) {
        Image(
            painter = rememberCoilPainter(
                request = "<https://clubhouse.golftec.com/asset/1624419776645-shop-banner.jpeg>",
                fadeIn = true,

            ),
            contentDescription = "",
            contentScale = ContentScale.FillBounds
        )
    }
Oh adding
modifier = Modifier.fillMaxSize()
did the trick
Thanks alot!