title: Android receipt/zigzag drawable/layout
body: <p>I'm in need of creating a receipt layout in Android. 
  The idea is very simple, a rectangle layout with a zigzag bottom edge.</p>
  
  <p>The best result would be a drawable/layout with a fixed zigzag size (meaning, fixed half-triangle size), 
  which will multiply the amount of triangles according to the shape's actual width, in real time. With a clip maybe,  to have clipped triangles if necessary. </p>
  
  <p>Here is a good example (<strong>edit</strong>: I'm referring to the bottom zigzag line) :</p>
  
  <p><img src="https://i.stack.imgur.com/wgG8y.png" alt="enter image description here"></p>
  
  <p>I actually have no solid idea of how to create it.  Thought of 9 patch,  but it seems unfitting.  Thought of list-layer drawable with horizontal offsets maybe.. </p>
  
  <p>Maybe it is possible to create a 9 patch with separate scale sections, to keep the zigzag's aspect ratio... This would also be OK.</p>
  
  <p><strong>EDIT - ANSWER</strong>
  Using @Luksprog 's comment, I easily recreated what I wanted.<br>
  Here is some code:</p>
  
  <p>Image (note that height corresponds to the source image size):  </p>
  
  <pre><code>    &lt;ImageView
          android:id="@+id/zigzag_bottom"
          android:layout_width="match_parent"
          android:layout_height="12dp"
          android:adjustViewBounds="true"
          android:scaleType="fitXY"
          android:src="@drawable/zigzag" /&gt;    
  </code></pre>
  
  <p>drawable:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;bitmap xmlns:android="http://schemas.android.com/apk/res/android"
          android:src="@drawable/ic_zigzag"
          android:tileMode="repeat"
          android:antialias="true"
      /&gt;
  </code></pre>