Android 矢量圆线宽

Android vector circle line width

所以我有一个带有空心圆的矢量可绘制对象。圆圈的线太细了,所以我想用 android:strokeWidth 把它变大,但它没有改变任何东西。有什么想法吗?

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

<path
      android:fillColor="@color/grey"
      android:pathData="M24.3,1.5C11.9,1.5 1.8,11.6 1.8,24s10.1,22.5 22.5,22.5S46.8,36.4 46.8,24S36.7,1.5 24.3,1.5zM24.3,43.8C13.4,43.8 4.5,34.9 4.5,24S13.4,4.2 24.3,4.2c10.9,0 19.8,8.9 19.8,19.8S35.2,43.8 24.3,43.8z"/>
</vector>

试试看

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">
    <stroke
        android:width="5dp"
        android:color="@color/grey" />
    <size
        android:width="48dp"
        android:height="48dp" />
</shape>

改变宽度

 <stroke android:color="@color/black"
          android:width="5dp"/>

像那样?

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

    <path
        android:fillColor="@color/grey"
        android:strokeColor="@color/grey"
        android:strokeWidth="3"
        android:pathData="M24.3,1.5C11.9,1.5 1.8,11.6 1.8,24s10.1,22.5 22.5,22.5S46.8,36.4 46.8,24S36.7,1.5 24.3,1.5zM24.3,43.8C13.4,43.8 4.5,34.9 4.5,24S13.4,4.2 24.3,4.2c10.9,0 19.8,8.9 19.8,19.8S35.2,43.8 24.3,43.8z">
    </path>
</vector>