我有一些 SVG 格式的图标。将其转换为 VectorDrawables 似乎并不好。它应该是锋利的
有谁知道可能是什么原因?
我有一些 SVG 格式的图标。将其转换为 VectorDrawables 似乎并不好。它应该是锋利的
有谁知道可能是什么原因?
This question is quite old, and I hope you found a solution long ago, but this seems like svg behavior that I've experienced before. In my case, the issue was that the svg was using the wrong fill-rule
.
The gist is that the svg spec includes two fill-rule
s; nonzero
, and evenodd
. Android only supports nonzero
prior to API level 24. You can change the fill rule directly in the VectorDrawable
, but you might need to make some edits to your svg so the paths are looping in the right direction.
For anyone who encounters this later, check out this article for a great explanation.