注意是否在vector里设置了 android:fillType="evenOdd",有的话把它删掉android
有问题的代码: 3d
android:width="12dp"
android:height="11dp"
android:viewportWidth="12"
android:viewportHeight="11">
android:fillColor="#00000000"
android:fillType="evenOdd"
android:pathData="M1.2696,1.6109L10.159,9.3891"
android:strokeWidth="2"
android:strokeColor="#FF3B30"
android:strokeLineCap="round" />
android:fillColor="#00000000"
android:fillType="evenOdd"
android:pathData="M10.159,1.6109L1.2696,9.3891"
android:strokeWidth="2"
android:strokeColor="#FF3B30"
android:strokeLineCap="round" />
好用的代码:code
android:width="13dp"
android:height="13dp"
android:viewportWidth="13"
android:viewportHeight="13"
android:tint="?android:colorPrimary">
android:fillColor="#FF000000"
android:pathData="M1.2917,6.5L11.8333,6.5"
android:strokeWidth="2"
android:strokeColor="#FF000000"
android:strokeLineCap="round" />
android:fillColor="#FF000000"
android:pathData="M6.5625,1L6.5625,12"
android:strokeWidth="2"
android:strokeColor="#FF000000"
android:strokeLineCap="round" />