How can I add a blur effect on a drawable image placed in the image view object of a layout, using xml not Java? I want to code this blur effect in XML.
            Asked
            
        
        
            Active
            
        
            Viewed 7,886 times
        
    1 Answers
4
            
            
        It is not currently possible to produce a blur effect within the layout XML of an Android application.
However, it is possible through the use of Java. There are a number of techniques available to do this (see here for a recent guide on how to do this effectively). Usually either Renderscript or the re-scaling of the image is used to generate a blur of the image.
Edit:
It may now be possible to achieve a blur solely by adding an XML property through the use of a custom data binding adapter. Check out the data binding library for more on how to create an adapter
        Community
        
- 1
 - 1
 
        Ed Holloway-George
        
- 5,092
 - 2
 - 37
 - 66