0

I went through all of the dashed divider topics alrady, but somehow my issue persists:

I have a vertical LinearLayout and want to display dashed dividers between each item in the LinearLayout. I use the following shape, but still get a straight line.

<?xml version="1.0" encoding="utf-8"?>
    <shape xmlns:android="http://schemas.android.com/apk/res/android"
        android:shape="line">

    <stroke
        android:color="#7b7b75"
        android:dashGap="2dp"
        android:dashWidth="1dp"
    />

    <size android:height="1dp"/>



</shape>
Johannes
  • 224
  • 3
  • 11

1 Answers1

0

Please try this.

drawable/dotted.xml:

<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">

    <stroke
       android:color="#C7B299"
       android:dashWidth="10px"
       android:dashGap="10px" />
</shape>

view.xml:

<ImageView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:src="@drawable/dotted" />
Chirag
  • 55,270
  • 29
  • 150
  • 194