How do I set a background on a view without affecting its dimensions?
<p>I want use a tiled background to give a texture to an existing layout. So I have created a drawable like this:</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/green-linen"
    android:tileMode="repeat" &gt;
&lt;/bitmap&gt;
</code></pre>

<p>Where "green-linen.jpg" is a 800x800 texture that I want to use. Then where I wish to use it on a layout I set background to point to this.</p>

<pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" android:layout_height="wrap_content"
    android:gravity="center_vertical|center_horizontal"
    android:orientation="vertical" android:background="@drawable/background"&gt;
</code></pre>

<p>The problem is now the layout thinks it needs to be 800x800 to accomodate the pattern which screws up the design. Is there any way to set a background but without affecting the existing layout? Plan B would probably be to write a custom paint routine but it likely to be more work and less efficient than just styling the page or setting the drawable.</p>
