skydoves / landscapist

🌻 A pluggable, highly optimized Jetpack Compose and Kotlin Multiplatform image loading library that fetches and displays network images with Glide, Coil, and Fresco.
https://skydoves.github.io/landscapist/
Apache License 2.0
2.05k stars 113 forks source link

contentScale particularly FillBounds dosen't works when using animations #431

Open Micoder-dev opened 7 months ago

Micoder-dev commented 7 months ago
                ```GlideImage(modifier = Modifier.fillMaxWidth(),
                    imageModel = { newKids.imgUrl },
                    component = rememberImageComponent {
                    +ShimmerPlugin(
                        shimmer = com.skydoves.landscapist.placeholder.shimmer.Shimmer.Flash(
                            baseColor = Color.DarkGray,
                            highlightColor = Color.LightGray,
                        )
                    )
                    +CircularRevealPlugin(duration = 800)
                }, imageOptions = ImageOptions(contentScale = ContentScale.FillBounds, alignment = Alignment.Center),
                    failure = {
                    Image(painter = painterResource(id = R.drawable.logo), contentDescription = null, modifier = Modifier.fillMaxSize().background(Color.Transparent), contentScale = ContentScale.Crop)
                })```

here is used "CircularRevealPlugin" Now by default the content scale acts as crop even if I specified Fillbounds, if I remove the animation contentScale fillbounds works as expected