If I create a Library and add normal drawable int drawable-xxhdpi, then add Resource file with the same name at the app.the app's Reasource will replace the library's Resource, just like:
But if I use the svg resource,It won't replace the library's Resource,like:
How to replace the vector drawable?
During the build, vector drawables from the library are placed in the drawable-anydpi-v21 folder.
Since this will take precedent on all v21+ devices, you need to move your app drawable to the same folder if you want it to override the library resource.
For pre-v21, you need to set vectorDrawables.useSupportLibrary = true
on the library and the app, and place the vector drawable in the drawable folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With