title: problems with adding action button in android tutorial
body: <p>I am following the android tutorial and i have problems with adding the search button to the action bar.</p>
  
  <p>I have the following main_activity_actions.xml because i support android version 8:</p>
  
  <pre><code>&lt;menu xmlns:android="http://schemas.android.com/apk/res/android"
       xmlns:yourapp="http://schemas.android.com/apk/res-auto" &gt;
      &lt;!-- Search, should appear as action button --&gt;
      &lt;item android:id="@+id/action_search"
            android:icon="@drawable/ic_action_search"
            android:title="@string/action_search"
            yourapp:showAsAction="ifRoom" /&gt;
      &lt;!-- Settings, should always be in the overflow --&gt;
      &lt;item android:id="@+id/action_settings"
            android:title="@string/action_settings"
            yourapp:showAsAction="never" /&gt;
  &lt;/menu&gt;
  </code></pre>
  
  <p>Then in the MainActivity class:</p>
  
  <pre><code>@Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu items for use in the action bar
          MenuInflater inflater = getMenuInflater();
          inflater.inflate(R.menu.main_activity_actions, menu);
          return super.onCreateOptionsMenu(menu);
      }
  
      @Override
       public boolean onOptionsItemSelected(MenuItem item) {
              // Handle presses on the action bar items
              switch (item.getItemId()) {
              case R.id.action_search:
              //  openSearch();
                  return true;
              case R.id.action_settings:
              //  openSettings();
                  return true;
              default:
                  return super.onOptionsItemSelected(item);
              }
  }
  </code></pre>
  
  <p>This is my style.xml which should be ok:</p>
  
  <pre><code>&lt;resources&gt;
  
      &lt;!--
          Base application theme, dependent on API level. This theme is replaced
          by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
      --&gt;
      &lt;style name="AppBaseTheme" parent="Theme.AppCompat.Light"&gt;
          &lt;!--
              Theme customizations available in newer API levels can go in
              res/values-vXX/styles.xml, while customizations related to
              backward-compatibility can go here.
          --&gt;
      &lt;/style&gt;
  
      &lt;!-- Application theme. --&gt;
      &lt;style name="AppTheme" parent="AppBaseTheme"&gt;
          &lt;!-- All customizations that are NOT specific to a particular API-level can go here. --&gt;
      &lt;/style&gt;
  
  &lt;/resources&gt;
  </code></pre>
  
  <p>this is my screen I don't see the search action button <img src="https://i.stack.imgur.com/ZUeNp.jpg" alt="screen"></p>
  
  <p>.</p>
  
  <p>What else could i check?
  I cannot find anything additional in the web.
  The following answers of stackoverflow did not help me:
  <a href="https://stackoverflow.com/questions/19096285/cant-add-search-button-to-action-bar-in-android-developer-tutorial?rq=1">Can&#39;t add Search button to Action Bar in Android Developer Tutorial</a></p>