title: Set Activity background without stretching
body: <p>I'm trying to set a background image in my Android application.
  I have a JPEG image and I want to fill the screen with the height of the image, maintaining the same aspect ratio.</p>
  
  <p>I tried by creating an XML bitmap file in drawable and setting it as:</p>
  
  <pre class="lang-xml prettyprint-override"><code>android:background="@drawable/background_image"
  </code></pre>
  
  <p>This is the XML</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;bitmap xmlns:android="http://schemas.android.com/apk/res/android"
      android:src="@drawable/wallpaper1_1920x1200"
      android:tileMode="disabled"
      android:gravity="center" &gt;
  &lt;/bitmap&gt;
  </code></pre>
  
  <p>With the 'center' tag it doesn't stretch the image and it doesn't resize it.</p>
  
  <p>Is there any way to show the full height of the image (and cropping sides) maintaining the original aspect ratio?</p>