title: ImageView adjustViewBounds not working with Relative Layout
body: <p>I have an <code>ImageView</code> and have set its <code>layout_height</code> to "100dp" and its layout_width to "wrap_content". </p>
  
  <p>The drawable used has bigger actual dimensions that are 130dp (width) X 215dp (height).</p>
  
  <p>When the <code>ImageView</code> is placed inside a <code>LinearLayout</code>, if I set <code>adjustViewBounds</code> to true, it gets a width that is measured according to the drawable's aspect ratio and the layout_width.</p>
  
  <p>However, when placed inside a <code>RelativeLayout</code> the <code>ImageView</code> gets the same width as the drawable (130dp), no matter the adjustViewBounds settings.</p>
  
  <p>In both cases the image renders correclty without distortion, however the ImageView's bounds are different.</p>
  
  <p>The RelativeLayout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@android:color/background_light"&gt;
  
      &lt;ImageView
          android:layout_width="wrap_content"
          android:layout_height="100dp"
          android:adjustViewBounds="true"
          android:src="@drawable/phone_orange"
          android:contentDescription="@null" /&gt;
  
   &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/CiUcQ.png" alt="ImageView in Relative Layout"></p>
  
  <p>The LinearLayout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@android:color/background_light"
      android:orientation="vertical" &gt;
  
      &lt;ImageView
          android:layout_width="wrap_content"
          android:layout_height="100dp"
          android:adjustViewBounds="true"
          android:contentDescription="@null"
          android:src="@drawable/phone_orange" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/YVB13.png" alt="ImageView in LinearLayout"></p>
  
  <p>Why does the <code>ImageView</code> measures differently in these 2 scenarios? Is there a way to make the <code>ImageView</code> behave always like being in the LinearLayout case (wrapping it with a LinearLayout works but it's not a clean solution)?</p>