SVG Blur on pre Lollipop devices

720 views Asked by At

When i inflate SVG into ImageView, it appears blurred on pre-lollipop devices whereas it is working fine on Lollipop or later devices. I don't want to use third party libraries to process svg and inflate it into ImageView. Please help.

enter image description here

1

There are 1 answers

0
Shanki Bansal On

you need to add vectorDrawables.useSupportLibrary = true to your build.gradle file: :

///////////For Gradle Plugin 2.0+ 
        android {  
           defaultConfig {  
             vectorDrawables.useSupportLibrary = true  
            }  
         }  

=========================================

///////////For Gradle Plugin 1.5  
         android {  
           defaultConfig {  
             generatedDensities = []  
          }  

          // This is handled for you by the 2.0+ Gradle Plugin  
          aaptOptions {  
            additionalParameters "--no-version-vectors"  
          }  
         } 

Check out this link for more info : http://android-developers.blogspot.in/2016/02/android-support-library-232.html