I need to create a mailing list layout in Android. The idea is very simple: the layout of the rectangle with the bottom edge of the zigzag.
The best result would be a drawable / layout with a fixed zigzag size (which means a fixed size of the polygon), which will multiply the number of triangles according to the actual width of the shape in real time. Perhaps with a clip, if necessary, trim the triangles.
Here is a good example ( edit : I mean the bottom line of the zigzag):

In fact, I have no solid idea of how to create it. Thought of patch 9 but seems unusable. The idea that a list layer can be used with horizontal offsets may be.
It may be possible to create patch 9 with separate sections of the scale to maintain the zigzag aspect ratio ... That would also be nice.
EDIT - ANSWER Using @Luksprog's comment, I easily recreated what I wanted.
Here is the code:
Image (note that the height matches the size of the original image):
<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" />
range hood:
<?xml version="1.0" encoding="utf-8"?> <bitmap xmlns:android="http://schemas.android.com/apk/res/android" android:src="@drawable/ic_zigzag" android:tileMode="repeat" android:antialias="true" />
guy_m source share