Search code examples
androidxmlandroid-layoutandroid-vectordrawable

Android vector circle line width


so i have a vector drawable with an hollow circle. The line of the circle is too thin though so i wanted to make it larger with android:strokeWidth but it doesn't change anything. Any ideas?

<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>

Solution

  • Like that?

    <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>