title: How to properly scale a square imageview into a rectangle imageview?
body: <p>I am having some trouble trying to scale a square image (that is about 315dp x 315dp) to an image that should fill the width and have about 200dp height. </p>
  
  <p>Basically what I am trying to do is to just properly preserve the aspect ratio of the image when it gets scaled to a more rectangular shape.  Any ideas? Here is what I've tried:</p>
  
  
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/layout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:gravity="center" &gt;
  
      &lt;ImageView
          android:id="@+id/image"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:layout_gravity="center"
          android:adjustViewBounds="true"
          android:scaleType="centerCrop" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>