title: How to make background stretch in Android layout
body: <p>So what I am trying to do is display background for list row element. I've created row layout and applied style :</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/layout1" android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  style="@style/product1" &gt;
  </code></pre>
  
  <p>I've set style as:</p>
  
  <pre><code>&lt;style name="product1"&gt;
       &lt;item name="android:background"&gt;@drawable/product1&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>and product1.xml as :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;bitmap
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:src="@drawable/prod1"
      android:antialias="true"
      android:dither="true"
      android:filter="false"
      android:gravity="right"
      android:scaleType="fitXY" /&gt;
  </code></pre>
  
  <p>where prod1.9.png is a nine patch set to be scalable top and left (so I want to have my image in right lower corner)</p>
  
  <p>But the problem I am facing now is that icon is displayed in the corner while 9patch is not scaled left and up.</p>
  
  <p>If instead of using style I put <code>android:background=@drawable/prod1</code> then it scales but every row get ridiculously big. Any ideas?</p>