RenderEffect sample (Android 12 +)
Since Android 12, the view blur function has been added to the Android API, so it is the API verification app.
RenderEffect
View#setRenderEffect
setBackgroundBlurRadius
setBackgroundBlurRadius
is used for Window content.
Note that the following Exception will occur if 0.0
is specified for the arguments radiusX and radiusY ofView#setRenderEffect
.
java.lang.IllegalArgumentException: nativePtr is null
- Using the
setRenderEffect(android.graphics.RenderEffect)
API, you can set the blur in any view. - You can also blur what is behind the Window content