title: Drawing triangle in XML
body: <p>In XML I'm attempting to draw a drop down triangle to be used as a background for a button but cant seem to get my head round the rotate XML tags. </p>
  
  <p>Here's my XML code:</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="80%"
              android:pivotY="20%"&gt;
              &lt;shape
                  android:shape="rectangle" &gt;
                  &lt;solid
                      android:color="#FFCC00" /&gt;
              &lt;/shape&gt;
          &lt;/rotate&gt;
      &lt;/item&gt;
  &lt;/layer-list&gt;
  </code></pre>
  
  <p>And here's the outcome of the XML:</p>
  
  <p><img src="https://i.stack.imgur.com/J92lg.png" alt="enter image description here"></p>
  
  <p>Any ideas are appreciated.</p>