Android Dash Lines Not Showing <p>Just note, I did reference the creating a dash line issues here on SO and with various searches via Google... Anyway, the issue is just that. I am not able to draw dash lines via xml (Can with DashPathEffect but don't want to keep doing this). Here is the dash drawable I use (dash_line.xml):</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line"&gt; &lt;stroke android:color="@color/whiteColor" android:dashWidth="10dp" android:width="10dp" android:dashGap="4dp"/&gt; &lt;/shape&gt; </code></pre> <p>Now, then the implementation in xml for the imageview:</p> <pre><code>&lt;ImageView android:id="@+id/dash_test" android:layout_width="200dp" android:layout_height="10dp" android:background="@drawable/dash_line"/&gt; </code></pre> <p>I am working with Android API 18. I even disable Hardware Acceleration in the manifest and even on the view itself by setting the layer type (both tried in xml and programmatically). I verified by taking the view, dashView.isHardwareAccelerated() and it is false. Any thoughts as to what I am missing?</p> <p>Edit: I can draw solid lines by the way so I know its not a layering issue. </p> <p>Edit: One work around is to use PathDashEffect. Although then you get into the issue of not being able to draw on top of images (which I would need to do). So... still would like an xml solution.</p>