title: SearchView wrong alignment
body: <p>I'm having a problem with the alignment of the SearchView when it's expanded. For some reason, when collapsed it aligns rights, but when expanded it aligns left. I did everything folowing the ActionBarSherlock examples.</p>
  
  <p>Here are two screenshots of the problem:</p>
  
  <p><a href="http://img59.imageshack.us/img59/8976/.png" rel="nofollow noreferrer">Screenshot collapsed http://img59.imageshack.us/img59/8976/.png</a></p>
  
  <p><a href="http://img577.imageshack.us/img577/9890/.png" rel="nofollow noreferrer">Screenshot expanded http://img577.imageshack.us/img577/9890/.png</a></p>
  
  <p>I have yet to decide if I want to use ActionBar tabs. I don't want the searchView to hide them when expanded. But that's for another question. My main issue here is the alignment of the SearchView when exapanded. I want it to keep the right alignment no matter what.</p>
  
  <p>Here's my onCreateOptionsMenu:</p>
  
  <pre><code>@Override
  public boolean onCreateOptionsMenu(Menu menu) {
  
      getSupportMenuInflater().inflate(R.menu.menu_main, menu);
      searchMenuItem = menu.findItem(R.id.action_search);
      refreshMenuItem = menu.findItem(R.id.action_refresh);
  
      refreshMenuItem.setActionView(R.layout.refresh_progressbar);
  
      searchMenuItem.setOnActionExpandListener(new OnActionExpandListener() {
  
          @Override
          public boolean onMenuItemActionExpand(MenuItem item) {
              return true;
          }
  
          @Override
          public boolean onMenuItemActionCollapse(MenuItem item) {
              flightsListAdapter.getFilter().filter("");
              return true;
          }
      }); 
  
      searchView = (SearchView)searchMenuItem.getActionView();
      searchView.setQueryHint(getResources().getString(R.string.search_hint));
      searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
          @Override
          public boolean onQueryTextSubmit(String query) {
              searchView.clearFocus();
              return true;
          }
  
          @Override
          public boolean onQueryTextChange(String query) {
              flightsListAdapter.getFilter().filter(query);
              return true;
          }
      });
      searchView.clearFocus();
  
      return true;
  }
  </code></pre>
  
  <p>And here is my menu_main.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;menu xmlns:android="http://schemas.android.com/apk/res/android" &gt;
  
  &lt;item
      android:id="@+id/action_search"
      android:title="@string/search"
      android:icon="@drawable/ic_search"
      android:showAsAction="always|collapseActionView"
      android:actionViewClass="com.actionbarsherlock.widget.SearchView" /&gt;
  
  &lt;item
      android:title="@string/date"
      android:icon="@drawable/ic_compose"
      android:showAsAction="always" &gt;
      &lt;menu&gt;
          &lt;item
              android:id="@+id/menuYesterday"
              android:title="Yesterday"/&gt;
          &lt;item
              android:id="@+id/menuToday"
              android:title="Today"/&gt;
          &lt;item
              android:id="@+id/menuTomorrow"
              android:title="Tomorrow"/&gt;
      &lt;/menu&gt;
  &lt;/item&gt;
  
  &lt;item
      android:id="@+id/action_refresh"
      android:icon="@drawable/ic_refresh"
      android:showAsAction="always"
      android:title="@string/action_refresh" /&gt;
  &lt;/menu&gt;
  </code></pre>
  
  <p>Thank you for reading :)</p>