如何在心形drawable xml中添加边框(描边)线

PRP*_*PRP 0 xml android android-shape android-vectordrawable

  • 如下我绘制可绘制的 xml 像心形
  • 但我想添加边框线,如(描边)
  • 我遇到一些困难如何添加该行

    <path
        android:fillColor="#a39f9f"
        android:pathData="M12,21.35l-1.45,-1.32C5.4,15.36 2,12.28 2,8.5 2,5.42 4.42,3 7.5,3c1.74,0 3.41,0.81 4.5,2.09C13.09,3.81 14.76,3 16.5,3 19.58,3 22,5.42 22,8.5c0,3.78 -3.4,6.86 -8.55,11.54L12,21.35z"/>
    
    Run Code Online (Sandbox Code Playgroud)

Nil*_*hod 5

尝试这个

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

    <path
        android:fillColor="#a39f9f"
        android:strokeColor="#ff0"
        android:strokeWidth="2"
        android:pathData="M12,21.35l-1.45,-1.32C5.4,15.36 2,12.28 2,8.5 2,5.42 4.42,3 7.5,3c1.74,0 3.41,0.81 4.5,2.09C13.09,3.81 14.76,3 16.5,3 19.58,3 22,5.42 22,8.5c0,3.78 -3.4,6.86 -8.55,11.54L12,21.35z"/>

</vector>
Run Code Online (Sandbox Code Playgroud)

输出

在此输入图像描述