Here is an example:
<?xml version="1.0" encoding="UTF-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape android:shape="rectangle">
<solid android:color="#ffffff" />
</shape>
</item>
<item
android:top="-400dp">
<shape android:shape="line">
<stroke
android:width="2dp"
android:color="#ff0000"
android:dashWidth="10dp"
android:dashGap="10dp" />
</shape>
</item>
<item
android:top="-300dp">
<shape android:shape="line">
<stroke
android:width="2dp"
android:color="#ff0000"
android:dashWidth="10dp"
android:dashGap="10dp" />
</shape>
</item>
<item
android:top="-200dp">
<shape android:shape="line">
<stroke
android:width="2dp"
android:color="#ff0000"
android:dashWidth="10dp"
android:dashGap="10dp" />
</shape>
</item>
<item
android:top="-100dp">
<shape android:shape="line">
<stroke
android:width="2dp"
android:color="#ff0000"
android:dashWidth="10dp"
android:dashGap="10dp" />
</shape>
</item>
<item
android:top="0dp">
<shape android:shape="line">
<stroke
android:width="2dp"
android:color="#ff0000"
android:dashWidth="10dp"
android:dashGap="10dp" />
</shape>
</item>
<item
android:top="100dp">
<shape android:shape="line">
<stroke
android:width="2dp"
android:color="#ff0000"
android:dashWidth="10dp"
android:dashGap="10dp" />
</shape>
</item>
<item
android:top="200dp">
<shape android:shape="line">
<stroke
android:width="2dp"
android:color="#ff0000"
android:dashWidth="10dp"
android:dashGap="10dp" />
</shape>
</item>
<item
android:top="300dp">
<shape android:shape="line">
<stroke
android:width="2dp"
android:color="#ff0000"
android:dashWidth="10dp"
android:dashGap="10dp" />
</shape>
</item>
<item
android:top="400dp">
<shape android:shape="line">
<stroke
android:width="2dp"
android:color="#ff0000"
android:dashWidth="10dp"
android:dashGap="10dp" />
</shape>
</item>
</layer-list>
and the screenshot:

In the example there are nine dashed lines. You can place as much of those as you want by moving each new line up and down relative to the central line, the one with android:top="0dp"
attribute.
Here is more info on Shape Drawable.