Adarsh Adarsh - 3 months ago 30
Android Question

How to blur a relativeLayout

Hi my app contain a service class.In service class I have a

WindowManager
which contains a
RelativeLayout
init.I want to blur the relative layout so that everything behind that will look blurred.I have got some blurring code but they work only in Activity class not in service class.So,are there any solution.I want to simply blur a relativeLayout so that everything behind that will look blurrish.

The code that I use to blur the layout

http://pastebin.com/7Yh9pH6J

Answer
Yes send Context or Activity parameter to services class of Activity and then use
like that 



In service class 
    public void functionname(Context context){
    //do what u want
    }

   In Activity class
    //call this function in activity class

    functionname(this);
Comments