title: Android ActionbarSherlock SearchView
body: <p>Can we implement SeachView in Android 2.2 using ActionbarSherlock.</p>
  
  <p>I am using following code, it is working fine in 3.0 but not working in 2.2</p>
  
  <pre><code> @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      //getMenuInflater().inflate(R.menu.main_menu, menu);
       MenuInflater inflater = getMenuInflater();
          inflater.inflate(R.menu.main_menu, menu);
      // set up a listener for the refresh item
  
  
          SearchView searchView = (SearchView) menu.findItem(R.id.menu_search).getActionView();
          final SearchView.OnQueryTextListener queryTextListener = new    SearchView.OnQueryTextListener() {
              @Override
              public boolean onQueryTextChange(String newText) {
                  // Do something
                  System.out.println("onQueryTextChange----------");
                  return true;
              }
              @Override
              public boolean onQueryTextSubmit(String query) {
                  // Do something
                  System.out.println("onQueryTextSubmit----------");
                  return true;
              }
          };
          searchView.setOnQueryTextListener(queryTextListener);
  
     return true;
       }
  </code></pre>
  
  <p>I am getting following error on 2.2</p>
  
  <pre><code>    at 01-23 17:31:53.230: W/MenuInflater(20214):   at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
  01-23 17:31:53.230: W/MenuInflater(20214):  at com.actionbarsherlock.internal.view.menu.MenuInflaterImpl$MenuState.newInstance(MenuInflaterImpl.java:533)
  01-23 17:31:53.230: W/MenuInflater(20214):  at com.actionbarsherlock.internal.view.menu.MenuInflaterImpl$MenuState.setItem(MenuInflaterImpl.java:497)
  01-23 17:31:53.230: W/MenuInflater(20214):  at com.actionbarsherlock.internal.view.menu.MenuInflaterImpl$MenuState.addItem(MenuInflaterImpl.java:515)
  01-23 17:31:53.230: W/MenuInflater(20214):  at com.actionbarsherlock.internal.view.menu.MenuInflaterImpl.parseMenu(MenuInflaterImpl.java:238)
  01-23 17:31:53.230: W/MenuInflater(20214):  at com.actionbarsherlock.internal.view.menu.MenuInflaterImpl.inflate(MenuInflaterImpl.java:164)
  01-23 17:31:53.230: W/MenuInflater(20214):  at com.actionbarsherlock.sample.styledactionbar.MainActivity.onCreateOptionsMenu(MainActivity.java:99)
  01-23 17:31:53.230: W/MenuInflater(20214):  at android.support.v4.app.FragmentActivity.dispatchCreateOptionsMenu(FragmentActivity.java:601)
  01-23 17:31:53.230: W/MenuInflater(20214):  at android.support.v4.app.FragmentActivity.invalidateOptionsMenu(FragmentActivity.java:706)
  </code></pre>