https://kotlinlang.org logo
#compose
Title
# compose
k

Kyant

10/31/2020, 11:42 PM
Is there a way to make a blur
Surface
(foreground) or
Image
(itself)?
r

romainguy

11/01/2020, 12:44 AM
Not directly. You can use Renderscript to blur a Bitmap
As for a Surface it depends on how you render into it
k

Kyant

11/01/2020, 1:22 AM
Well, I have implemented the blur Image, but how can I create the blur Surface? I want to blur the composables beneath the Surface.
r

romainguy

11/01/2020, 1:24 AM
Ah you can't do this without taking a screenshot or first drawing your composable to a Bitmap that then you blur
k

Kyant

11/01/2020, 1:51 AM
How to draw composable to Bitmap? 🤔
l

louiscad

11/01/2020, 9:01 AM
I think you can put the Composable in a ViewGroup/View that you draw on a canvas from a bitmap.
4 Views