title: Create a Horizontal dotted line in android layout
body: <p>in my layout I am trying to draw a DOTTED LINE.for drawing a horizontal line i am defining a view in my layout file.</p>
  
  <pre><code>     &lt;View
          android:layout_width="fill_parent"
          android:layout_height="1dip"
          android:background="@drawable/customdots" /&gt;
  </code></pre>
  
  <p>and customdots.xml</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
   &lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android" &gt;
    &lt;item
      android:left="10dp"
      android:right="10dp"
      android:width="4dp"
      android:drawable="@drawable/dotted" /&gt;
  
   &lt;/layer-list&gt;
  </code></pre>
  
  <p>dotted.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;size
      android:height="4dp"
      android:width="1024dp"/&gt;
    &lt;stroke
     android:width="4dp" 
     android:dashWidth="4dp"
     android:color="@android:color/black"
     android:dashGap="5dp"/&gt;
  
  &lt;/shape&gt;
  </code></pre>
  
  <p>But i don't get any line using this code. please help me out. </p>
  
  <p>When i use customdots.xml in the listView Divider as</p>
  
  <pre><code> android:divider="@drawable/customdots"
  </code></pre>
  
  <p>it shows a good dotted line</p>