title: Android layout broken with 9-patch background
body: <p>I encountered this problem when updating my background to use a 9-patch image. The layout is fine on different screens using different sizes of the same image, but when I change the image to be a 9-patch it breaks the entire layout mysteriously.</p>
  
  <p>The previous layout looks like this:</p>
  
  <p><a href="http://onik.org/android/layoutOk.png">Original layout http://onik.org/android/layoutOk.png</a>.</p>
  
  <p>When changed to 9-patch:</p>
  
  <p><a href="http://onik.org/android/layoutError.png">9-Patch image http://onik.org/android/layoutError.png</a>.</p>
  
  <p>The XML file remained the same, just the PNG files were altered.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="@drawable/bg"&gt;
  
      &lt;TextView 
          android:text="@string/title"
          android:id="@+id/login_title"
          android:layout_width="fill_parent"
          android:layout_height="40px"
          android:textSize="30px"&gt;
      &lt;/TextView&gt;
  
      &lt;View
          android:id="@+id/login_underline"
          android:layout_width="wrap_content"
          android:layout_height="2px"
          android:background="#aaaaaa"&gt;
      &lt;/View&gt;
  
      &lt;TableLayout
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:layout_weight="1"
          android:stretchColumns="1"
          android:gravity="center"
          android:paddingLeft="10px"
          android:paddingRight="10px"&gt;
  
          &lt;TableRow&gt;
              &lt;TextView
                  android:id="@+id/login_usernameLabel"
                  android:text="@string/login_usernameLabel"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:paddingRight="5px"&gt;
              &lt;/TextView&gt;
  
              &lt;EditText
                  android:text=""
                  android:id="@+id/login_username"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:inputType="textEmailAddress"
                  android:lines="1"
                  android:nextFocusDown="@+id/login_password"&gt;
              &lt;/EditText&gt;
  
          &lt;/TableRow&gt;
  
          &lt;TableRow&gt;
  
              &lt;TextView
                  android:id="@+id/login_passwordLabel"
                  android:text="@string/login_passwordLabel"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"&gt;
              &lt;/TextView&gt;
  
              &lt;EditText
                  android:text=""
                  android:id="@+id/login_password"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:nextFocusDown="@+id/login_login"
                  android:inputType="textPassword"&gt;
              &lt;/EditText&gt;
  
          &lt;/TableRow&gt;
  
          &lt;TableRow android:gravity="right"&gt;
  
              &lt;Button
                  android:text="@string/login_login"
                  android:id="@+id/login_login"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"&gt;
              &lt;/Button&gt;   
  
  
       &lt;/TableRow&gt;
  
          &lt;TableRow&gt;
  
              &lt;CheckBox
                  android:id="@+id/login_remember"
                  android:text="@string/login_remember"
                  android:layout_span="2"&gt;
              &lt;/CheckBox&gt;
  
          &lt;/TableRow&gt;
  
   &lt;/TableLayout&gt;
  
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Any ideas? Or other solutions to get non-scaled, centered background?</p>