To set the transparency level of a view background we use
mView.getBackground().setAlpha(mViewTransparencyLvl);
How to set the blur level of a view background?
Knowing that the background is a shape drawable not an image. Knowing that the user controls the blur degree. Knowing that this view is over part of another view.
Android doesn't provide this functionality for UI elements as iOS does. It's not part of the UI rendering engine and to obtain these kind of effects you need to use third-party libraries which will essentially take a snapshot of the drawing cache, reduce its size for a faster processing and then put the generated bitmap into a view.
Here are some example libraries:
Please bear in mind that this will have a serious performance hit on mid-low end phones.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With