title: Shape layer-list composition
body: <p>My goal is to have a drawable (shape) with this result:
  <a href="https://i.stack.imgur.com/HadfX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HadfX.png" alt="desired shape"></a></p>
  
  <p>What i tried so far:</p>
  
  <p><strong>triangle.xml</strong></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&gt;
          &lt;rotate
              android:fromDegrees="45"
              android:toDegrees="45"
              android:pivotX="87%"
              android:pivotY="140%"
              &gt;
              &lt;shape
                  android:shape="rectangle"&gt;
                  &lt;size
                      android:height="24dp"
                      android:width="24dp"
                      /&gt;
                  &lt;solid
                      android:color="@color/green" /&gt;
                  &lt;corners android:radius="1dp" /&gt;
              &lt;/shape&gt;
          &lt;/rotate&gt;
      &lt;/item&gt;
  &lt;/layer-list&gt;
  </code></pre>
  
  <p><strong>result_shape.xml</strong></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:drawable="@drawable/triangle" /&gt;
  
      &lt;item
          android:left="24dp"
          &gt;
          &lt;shape
              android:shape="rectangle"&gt;
  
              &lt;size
                  android:height="24dp"
                  android:width="40dp"
                  /&gt;
              &lt;solid
                  android:color="@color/c_white" /&gt;
  
              &lt;corners android:radius="1dp" /&gt;
          &lt;/shape&gt;
      &lt;/item&gt; 
  &lt;/layer-list&gt;
  </code></pre>
  
  <p>As result im getting the rectangle not aligned with the triangle and the triangle is now a rectangle with some rotation.</p>
  
  <p>How can I represent this image as drawable using shapes and layer-list ?</p>