Search code examples
androidborderstroke

android dashed border with padding


i have a RadioGroup RadioGroup I would like to add a dashed stroke(boder?) with some padding.

The background of Radio Buton is

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/navigation"/>
    <item >
        <shape>
            <solid android:color="#00000000"/>
            <stroke android:color="#ffffff"
                    android:dashGap="5dp"
                    android:dashWidth="5dp"/>
        </shape>
    </item>
</layer-list>

The second item - is my attemp to draw dashed line.

What am i doing wrong?


Solution

  • Try adding android:width="1dip" to your <stroke> tag.