title: <item> offset behavior not what I expected
body: <p>I have this drawable XML file. The target is to draw two concentric frames, the outer being yellow and the inner being red. And I want it all done in XML, using shapes, not in code and not using bitmaps.</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;shape android:shape="rectangle"&gt;
              &lt;solid android:color="@android:color/transparent"/&gt;
              &lt;stroke android:width="15dp" android:color="@color/Yellow"/&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
  
      &lt;item android:left="5dp"&gt;
          &lt;shape android:shape="rectangle"&gt;
              &lt;solid android:color="@android:color/transparent"/&gt;
              &lt;stroke android:width="3dp" android:color="@color/Red"/&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
  
  &lt;/layer-list&gt;
  </code></pre>
  
  <p>This generates this screen (ignore the 3 rectangles inside, just the framing yellow and red rectangles)</p>
  
  <p><img src="https://i.stack.imgur.com/o4Tm4.png" alt="enter image description here"></p>
  
  <p>This shows that the yellow frame is drawn OK and red frame is drawn with a 5dp left offset.
  My final red frame should have offest on all its sides</p>
  
  <pre><code>    &lt;item android:left="5dp" android:top="5dp" android:right="5dp" android:bottom="5dp"&gt;
  </code></pre>
  
  <p>See what happens when I add just one other offset</p>
  
  <pre><code>    &lt;item android:left="5dp" android:top="5dp"&gt;
          &lt;shape android:shape="rectangle"&gt;
              &lt;solid android:color="@android:color/transparent"/&gt;
              &lt;stroke android:width="3dp" android:color="@color/Red"/&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/KMVqV.png" alt="enter image description here"></p>
  
  <p>The same happens if I add all the required offsets.
  This not what I expected, according to <a href="http://developer.android.com/guide/topics/resources/drawable-resource.html#LayerList" rel="nofollow noreferrer">the documentation on item offset</a><br>
  What is happening here?
  How can I make the red frame shrink by 5dp as I wanted to?</p>
  
  <p><strong>EDIT</strong><br>
  I played a little with the offsets an found something wierd, using one negative offset of 5dp, see what I get:</p>
  
  <pre><code>    &lt;item android:left="-5dp" android:top="5dp" android:right="5dp" android:bottom="5dp"&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/PwUdK.png" alt="enter image description here"></p>
  
  <p>It only works with negative values <code>&lt;= -5dp</code>.  For negative values <code>&gt; 5dp</code> it still does not show the frames, as before.</p>
  
  <p>I strongly feel that the reason for all this behavior can only be one out of two:</p>
  
  <ul>
  <li>I am grossely misunderstaning how the offset values should be used</li>
  <li>It is a buggy behavior (in which case I would like confirmation so I can report it)</li>
  </ul>