title: SearchView on support.v7.appcompat library issue: default 9-patch background not renders properly
body: <p>I'm developing an app with ActionBar using support.v7.appcompat library. The action bar works, the SearchView is shown, the hint shows. The only problem is that the background of the SearchView is not scalling properly. Insead of the usual, it appears big and with the 9-patch black lines. </p>
  
  <h2>Using:</h2>
  
  <ul>
  <li>Developing from command line, using <code>ant debug</code> to compile.</li>
  <li>On Linux Mageia 3, ant version: Apache Ant(TM) version 1.8.4 compiled on January 11 2013</li>
  <li>Linking to library with project.properties line: </li>
  </ul>
  
  <blockquote>
    <p>android.library.reference.1=../../../../../sdk/extras/android/support/v7/appcompat/</p>
  </blockquote>
  
  <ul>
  <li>Using @style/Theme.AppCompat.Light</li>
  <li>Tested in device with CM10-1, in device with stock 4.1, and emulator with API 8 (Android 2.2). Same result in all devices. </li>
  </ul>
  
  <h1>Screenshot:</h1>
  
  <p><img src="https://i.stack.imgur.com/NFrny.png" alt="enter image description here"></p>
  
  <h1>Code:</h1>
  
  <h2>DiccionariCatala.java (main activity):</h2>
  
  <pre><code>import android.support.v7.app.ActionBarActivity;
  import android.support.v7.widget.SearchView;
  import android.support.v4.view.MenuItemCompat;
  import android.app.Activity;
  import android.app.SearchManager;
  import android.content.Context;
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.view.MenuInflater;
  
  
  public class DiccionariCatala extends ActionBarActivity
  {
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState)
      {   
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
      }   
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu){
          MenuInflater inflater = getMenuInflater();
          inflater.inflate(R.menu.menu_actions, menu);
          SearchManager SManager =  (SearchManager) getSystemService(Context.SEARCH_SERVICE);
          MenuItem searchMenuItem = menu.findItem(R.id.action_search);
          SearchView searchViewAction = (SearchView) MenuItemCompat.getActionView(searchMenuItem);
          searchViewAction.setSearchableInfo(SManager.getSearchableInfo(getComponentName()));
          searchViewAction.setIconifiedByDefault(false);
          return super.onCreateOptionsMenu(menu);
      }   
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item){
          switch (item.getItemId()) {
                  case R.id.action_search:
                      //openSearch();
                      return true;
                  default:
                      return super.onOptionsItemSelected(item);
          }   
      }      
  }
  </code></pre>
  
  <h2>menu_actions.xml (menu xml)</h2>
  
  <pre><code>&lt;menu xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:diccionaricatala="http://schemas.android.com/apk/res-auto" &gt;
      &lt;item android:id="@+id/action_search"
            android:title="@string/action_search_title"
            diccionaricatala:showAsAction="ifRoom"
            diccionaricatala:actionViewClass="android.support.v7.widget.SearchView" /&gt;
  &lt;/menu&gt;
  </code></pre>
  
  <h2>AndroidManifest.xml</h2>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.mypackage.apps"
        android:versionCode="1"
        android:versionName="1.0"&gt;
        &lt;uses-sdk android:minSdkVersion="8"  android:targetSdkVersion="16"/&gt;
        &lt;application android:label="@string/app_name"
                     android:icon="@drawable/ic_launcher"
                     android:theme="@style/Theme.AppCompat.Light"&gt;
  
         &lt;activity android:name="DiccionariCatala"
                   android:label="@string/app_name"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.SEARCH" /&gt;
              &lt;/intent-filter&gt;
              &lt;meta-data android:name="android.app.searchable"
                         android:resource="@xml/searchable"/&gt;
          &lt;/activity&gt;
     &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <h2>project.properties</h2>
  
  <pre><code>target=android-16
  android.library.reference.1=../../../../../sdk/extras/android/support/v7/appcompat/
  </code></pre>
  
  <p>Any help would me much apreciated. I can't find anything wrong, and there's also the weird fact that despide this, everything else work.  Thanks.</p>