VectorDrawable rendering issue

前端 未结 4 1118
梦如初夏
梦如初夏 2021-02-19 01:40

I\'m having problems with the VectorDrawables introduced by the support library.

Looking around, I read about similar issues regarding bad scaling or incorrect preview i

4条回答
  •  星月不相逢
    2021-02-19 01:55

    Solution

    After some more tries (and help from people), I've found the problem. The problem was with the fill-rule as other already experienced, but in the opposite way!

    In fact, as far as I know, VectorDrawable uses the non-zero fill-rule and has rendering problems with SVGs exported with the evenodd rule. That's why I've always used the non-zero rule. Turns out that using the android:fillType="evenOdd" one solves my problem.

    I don't know why, and at this point I'm too afraid to ask.

提交回复
热议问题