Search code examples
androiddrawable

Android ring drawable has line down the center


I'm trying to make a simple gray ring drawable, but for some reason there is a line going down the center of it and I can't seem to figure out why.

Preview:

ePreview

Code:

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:innerRadius="0dp"
    android:shape="ring"
    android:thicknessRatio="2"
    android:useLevel="false" >

    <solid android:color="@android:color/transparent" />

    <stroke
        android:width="2dp"
        android:color="@color/gray" />
</shape>

I used the code from this question: Transparent circle with border


Solution

  • This seems to go away if i use android:shape="oval" instead of android:shape="ring".