title: LinearLayout inside RelativeLayout uses super-parent as parent
body: <p>I have the following layout:</p>
  
  <pre><code>&lt;LinearLayout width:fill height:fill &gt;
    &lt;RelativeLayout width:fill height:wrap &gt;
      &lt;ImageView width:fill height:wrap &gt;
      &lt;LinearLayout width:wrap height:wrap /&gt;
    &lt;/RelativeLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>The innermost LinearLayout seems to have no idea that it is inside the RelativeLayout when it comes to vertical properties.  Gravity works only horizontally.  For all intents and purposes (vertically), the inner LinearLayout thinks that the outer LinearLayout is its parent. Aligning parent Top/Bottom stretches it and the RelativeLayout to fill the outer LinearLayout.  </p>
  
  <p>Ultimately what I want here is for the relative layout height to wrap the imageview almost as if it was its background (though it's meant to be an overlay on top of another view on top of the background), and the linear layout to simply work inside the constraints of the relative layout.</p>
  
  <p>Furthermore, I want to be able to clip anything that goes outside the bounds of the relative layout wrapping the imageview.  What's my best option here?</p>