0

We are using too many svgs in our application and everything seems working until monkey testing. As soon as we start monkey testing, few android devices (even with android version > lollipop) start losing visibility of all / random svgs or all / random svgs loses fill color and gets white fill color... couldn't get any clue... Is there any special attention we need to give towards any attribute during making of svgs? like if android may not support all attributes of svgs? Does making svg in adobe or sketch make any difference? We have tried making in both with no success...

Below is one of the svg that we are using:

<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="28dp"
    android:height="28dp"
    android:viewportWidth="28"
    android:viewportHeight="28">
  <path
      android:pathData="M14.5,3A11.5,11.5 0,1 1,3 14.5,11.5 11.5,0 0,1 14.5,3"
      android:fillColor="#fff"
      android:fillType="evenOdd"/>
  <path
      android:pathData="M13.434,3L13.3,3a8.276,8.276 0,0 0,-1.063 0.069c-0.07,0 -0.162,0.022 -0.231,0.022a11.492,11.492 0,0 1,0 22.817c0.116,0.022 0.231,0.022 0.37,0.046 0.278,0.022 0.578,0.046 0.856,0.046h0.208a11.5,11.5 0,1 0,0 -23"
      android:fillColor="#e6e7e7"
      android:fillType="evenOdd"/>
  <path
      android:pathData="M14,26A12,12 0,1 1,26 14,12 12,0 0,1 14,26ZM14,3.358A10.642,10.642 0,1 0,24.642 14,10.642 10.642,0 0,0 14,3.358Z"
      android:fillColor="#454b54"
      android:fillType="evenOdd"/>
  <path
      android:pathData="M13.5,10a0.5,0.5 0,1 0,0.5 0.5,0.491 0.491,0 0,0 -0.5,-0.5Z"
      android:fillColor="#454b54"
      android:fillType="evenOdd"/>
  <path
      android:pathData="M13.5,21c-0.283,0 -0.5,-0.309 -0.5,-0.712L13,13.712c0,-0.4 0.217,-0.712 0.5,-0.712s0.5,0.309 0.5,0.712v6.576C14,20.691 13.783,21 13.5,21Z"
      android:fillColor="#454b54"
      android:fillType="evenOdd"/>
</vector>

Sagar Patel
  • 506
  • 1
  • 8
  • 23
  • 1
    Some early versions of VectorDrawable had bugs in it's SVG path parsing. That could mean that some VectorDrawables will display alright on recent versions of Android, but not on earlier ones. Could that be it? Posting an example of a failing VectorDrawable might be helpful here. – Paul LeBeau Oct 11 '19 at 10:19
  • @PaulLeBeau can very long verctorPath be the reason of unexpected bad behavior like what we are facing? – Sagar Patel Oct 12 '19 at 06:36
  • How long is "very long"? Take a look at this answer. Do either of those bugs match your path? https://stackoverflow.com/questions/48362219/vector-drawable-render-issue-on-lollipop-devices-api22 – Paul LeBeau Oct 12 '19 at 12:45

0 Answers0