12

I was trying to add a vector drawable to Android studio Using the vector asset in Android studio, I've imported a psd file, it but it seems like there is a rendering problem as the preview and the result xml file are empty, please check the output xml screenshot. enter image description here

buczek
  • 2,011
  • 7
  • 29
  • 40
S qasem
  • 273
  • 1
  • 8

1 Answers1

1

In your screenshot there is no pathdata in the file. Hence, nothing is drawn on screen. I am showing contents of a VectorDrawable xml file. Copy the contents into a blank xml file in android studio and see the shape drawn in blue on screen.

<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="600dp"
        android:height="600dp"
        android:viewportWidth="800.0"
        android:viewportHeight="800.0">

    <path
        android:pathData="M  162   8
        q    -07    00   -41    26
        q    -34    27   -50    64
        q    -25    59   -19   117
        q     07    70    53   121
        q     57    63   151    62
        q     87   -01   140   -66
        q     46   -55    48  -142
        q     01   -56   -34  -105
        q    -38   -52   -77   -70
        l    -29   -11
        q     16   -01    31   -02
        q     59   -01   119   -02






             "

        android:strokeLineCap="round"
        android:strokeColor="#f00f"
        android:fillColor="#00000000"
        android:strokeWidth="32"/>



</vector>