Android recyclerview v.23.2.0 & design library v.23.2.0 are broken

后端 未结 2 1615
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-11 17:13

After update to v23.2.0 recyclerview items have strange behavior: very big with empty space. After update to design library 23.2.0 menu overflow icon became black (app has dark

2条回答
  •  耶瑟儿~
    2021-02-11 17:37

    It seems that two new libraries, support-vector-drawable and support-animated-vector-drawable, are required, because appcompat-v7 uses vector drawables (Issue discussion). Just update your build.gradle with the following for adding in support for vector drawables and the problem with black icons will be solved.

    build.gradle

    Add following lines to your build gradle base on your gradle plugin version

    // Gradle Plugin 2.0+

     android {  
       defaultConfig {  
         vectorDrawables.useSupportLibrary = true  
        }  
     }   
    

    // Gradle Plugin 1.5

     android {  
       defaultConfig {  
         generatedDensities = []  
      }  
    
      // This is handled for you by the 2.0+ Gradle Plugin  
      aaptOptions {  
        additionalParameters "--no-version-vectors"  
      }  
     } 
    

    UPDATE For AppCompat users, the flags for enabling support vector drawables described in the 23.2 blog post are no longer required for usage of AppCompat 23.2.1. However, you can still take advantage of the app:srcCompat attribute if you wish to use support vector drawables for your own resources.

提交回复
热议问题