title: How to stretch / scale background images in an Android linear layout?
body: <p>I need some help making a background image stretch or scale both vertically and horizontally in a linear layout. Every time I try to set the background however, it doesn't stretch the image to fit the screen. I'm not concerned about keeping the aspect ratio either. </p>
  
  <p>Here's what I've got in a test xml at the moment:</p>
  
  <pre><code>&lt;LinearLayout 
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/title"
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:background="@drawable/background"&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Which looks like this in preview (and in the game):</p>
  
  <p><img src="https://i.stack.imgur.com/BItLZ.jpg" alt="enter image description here"></p>
  
  <p>If I change the layout_height to fill_parent I get a repeating background:</p>
  
  <p><img src="https://i.stack.imgur.com/djQUj.jpg" alt="enter image description here">
  I'm sure the solution is extremely basic, but for some reason I'm missing it. Any help would be appreciated</p>
  
  <p>thanks</p>