title: creating colored stripes in android ListView
body: <p>I am trying to create thin colored stripes in my app. This is similar to stripes of different color that we see in calendar apps. </p>
  
  <p>Is there any easy way to do it.</p>
  
  <p><strong><em>What I am doing</em></strong>:
  I have a shape defined with width and height and I am trying to apply it to background of my ListView as it will occupy certain part of the ListView.</p>
  
  <p><strong><em>What is happening:</em></strong>
  This is getting applied to the whole background.</p>
  
  <p><strong><em>What I need:</em></strong>
  I am looking for help which can make this as stripes instead of complete background.
  or any other way or alternatives for doing the same.</p>
  
  <p><strong><em>Some code:</em></strong>
  <strong>rectangle.xml</strong></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="rectangle"&gt;
      &lt;corners 
          android:radius="0dp"
          /&gt;
      &lt;size 
          android:width="20dp"
          android:height="40dp"       /&gt;
      &lt;solid 
          android:color="@color/opaque_red"
          /&gt;
  &lt;/shape&gt;
  </code></pre>
  
  <p><strong>list_view_item_cell.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="95dp"
      android:divider="?android:dividerVertical"
  
      android:showDividers="middle" &gt;
  </code></pre>
  
  <p><strong><img src="https://i.stack.imgur.com/MxUQV.png" alt="Posting a picture to give more clarity:"></strong></p>