Android blurring image effect

posted in: Android, Mobile, tricks | 0

In your Android UI (layouts), sometimes you need to fill a big space with an image but have only small version of it.  Let’s use a bit of code to generate a blurred bitmap from an existing one.


I had hard time finding a fast and reliable java solution, so here it is!



The workflow is quite easy, apply a blur to the image by averaging their colors and then just darken it a little to contrast any light themed UI components (text, buttons, icons) that you will put on top.


I ran across a fastblur function on this stackoverflow post.


Disclaimer: The function was taken and improved from the previously linked Stackoverflow post.

Feel free to use it in your apps!

Leave a Reply