title: Android Scaling Image
body: <p>I have a <code>Relative layout</code> whose height is fixed - <code>356 px</code> and width is wrap content.<br>
  I have placed an <code>Imageview</code> with background as image .<br>
  The image dimensions are <code>496 px * 496 px</code>. <br></p>
  
  <p>The image is a square image but getting scaled as a rectangle . <br>
  Here is the <code>XML</code>- </p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/rlMain"
  android:layout_width="wrap_content"
  android:layout_height="356px" &gt;
  
  &lt;ImageView
      android:id="@+id/ivIcon"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:background="@drawable/outdoor_verygood_ring" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Here is how the original image is - <img src="https://i.stack.imgur.com/7sxtV.png" alt="enter image description here"></p>
  
  <p>Here is how it looks in the Relative layout -</p>
  
  <p><img src="https://i.stack.imgur.com/Di3PM.png" alt="enter image description here"></p>
  
  <p>What i want is - if the image is getting scaled it should <code>get scaled in both X and Y</code> .<br>
  How can i achieve this ?</p>