title: Actions not showing in android action bar
body: <p>I'm trying to make a dynamic action bar in android, right now I'm trying to make a search in the action bar like this.</p>
  
  <p><a href="http://developer.android.com/images/ui/actionbar-searchview@2x.png" rel="nofollow">http://developer.android.com/images/ui/actionbar-searchview@2x.png</a></p>
  
  <p>However when I click the the search button in the action bar nothing happens. </p>
  
  <p>Here is the menu XML file:</p>
  
  <pre><code>&lt;menu xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:custom="http://schemas.android.com/apk/res-auto" &gt;
  
   &lt;item android:id="@+id/action_search"
        android:title=""
        android:icon="@drawable/abc_ic_search"
        android:showAsAction="ifRoom|collapseActionView"
        android:actionViewClass="android.support.v7.widget.SearchView"/&gt;
  
   &lt;item android:id="@+id/action_menu"
        android:title=""
        android:icon="@drawable/abc_ic_menu"
        android:showAsAction="always" 
        android:actionViewClass="android.support.v7.widget.ShareActionProvider"/&gt;
  </code></pre>
  
  <p>Here is the OnCreateOptionsMenu in the Activity</p>
  
  <pre><code>@Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.    
      getMenuInflater().inflate(R.menu.main, menu);   
  
      MenuItem searchItem = menu.findItem(R.id.action_search);
      SearchView searchView = (SearchView) MenuItemCompat.getActionView(searchItem);
  
      return true;
  }
  </code></pre>
  
  <p>I know the icon I have in the action bar is working because I have this code working without problems</p>
  
  <pre><code>@Override
  public boolean onOptionsItemSelected(MenuItem item) {
      // Handle presses on the action bar items
      switch (item.getItemId()) {
          case R.id.action_search:
              Toast.makeText(getBaseContext(), "Search icon is working", Toast.LENGTH_LONG).show();
              return true;
          case R.id.action_menu:
              Toast.makeText(getBaseContext(), "Menu icon is working", Toast.LENGTH_LONG).show();
              return true;
          default:
              return super.onOptionsItemSelected(item);
      }
  }
  </code></pre>
  
  <p>I think it has something to do with this:</p>
  
  <pre><code>android:actionViewClass="android.support.v7.widget.SearchView"/&gt;
  </code></pre>
  
  <p>Because even when I delete the android.support.v7 jar on the project (I just deleted it to test, I have it back again) I can execute the project without any errors. So maybe the XML file doesn't recognise the android.support.v7 path? </p>
  
  <p>P.S: the action_menu icon doesn't work either.</p>