harjot-oberai / VectorMaster

Dynamic control over vector drawables!
MIT License
1.59k stars 160 forks source link

drawable resources versus xml (suggestion) #12

Open branscha opened 6 years ago

branscha commented 6 years ago

At first, I could not get the widget working for api 23 marshmallow. The vector graphics were in the res/drawable. It worked fine for api 24 nougat though. I got the error message "resource not found" on api 23.

The solution was to put the vector xml in the res/xml folder instead. Now the XML parser can find the resources on bot api 23 and 24. I noticed that the Android build system modifies the drawables directory name, it attaches -v23 or -v24 to the directory name while creating the apk.

Maybe the documentation should mention that the res/xml is a better location for the vector images then the drawables for the widget? What are your thoughts?

harjot-oberai commented 6 years ago

Well, honestly I didn't test on API 23 and didn't know that such an error could arise.

I will add your suggestion in the README.

Thanks.