skydoves / Cloudy

☁️ Jetpack Compose blur effect library, which falls back onto a CPU-based implementation to support older API levels.
Apache License 2.0
789 stars 28 forks source link

Support blur content inside only #13

Closed jiangnan44 closed 1 month ago

jiangnan44 commented 1 year ago

I need to blur an Image as background of a ConstraintLayout , but Cloudy seems to blur everything overlay . Please consider add this feture

nubpro commented 1 year ago

Love to see this happen too! @skydoves Please grant us the wish, you'll make a lot us very happy :)

nubpro commented 1 year ago
Box {
  Cloudy() {
      Box(
          modifier = Modifier
              .fillMaxSize()
              .background(Color(255, 255, 255).copy(alpha = 0.38f))
      )
  }
  Text(
      text = stringResource("Text here"),
      color = Color.Black,
      fontSize = 60.sp
  )
}

image

Im trying to blur the background only but it seems to be applying the blur around the text on top of it.

pavelperc commented 12 months ago

Also, when scrolling, scroll content is usually shifted. This makes the library useless.

image
vrajendraBhavsar commented 12 months ago

Hey @skydoves, Could you please provide a better way to handle this issue? I'm thinking of adding this to my project but it seem a bit unstable at this point, thanks a bunch in advance!

skydoves commented 1 month ago

Hey guys, the new version 0.2.0 has been released, and now you can resolve this issue by using the Modifier.cloudy modifier instead of the Cloudy composable function.

nubpro commented 1 month ago

Hey guys, the new version 0.2.0 has been released, and now you can resolve this issue by using the Modifier.cloudy modifier instead of the Cloudy composable function.

Havent tried it but thank you!