title: How to put menubutton on the ActionBar
body: <p>I have a problem with android ActionBar. I have created option which I can reach with the menu button. I'd like to use another button which is located on the ActionBar on the right side. I have read a lot about this and I tried almost everything but it doesn't work. </p>
  
  <p>menu_gallary.xml</p>
  
  <pre><code>&lt;menu xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  tools:context="hu.redbuttonebb.endi.fragmentek20.MainActivity"&gt;
  
  &lt;item
      android:orderInCategory="79"
      android:title="@string/action_settings"
      android:icon="@drawable/ic_action_overflow"
      app:showAsAction="ifRoom"&gt;
  
      &lt;menu&gt;
          &lt;item
              android:id="@+id/create_new"
              android:title="Album hozzáadása"
              app:showAsAction="always"
              android:orderInCategory="100"/&gt;
      &lt;/menu&gt;
  &lt;/item&gt;
  </code></pre>
  
  <p></p>
  
  <p>GalleryFragment.java:</p>
  
  <pre><code> @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setHasOptionsMenu(true);
  }
  
  @Override
  public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
          menu.clear();
          inflater.inflate(R.menu.menu_gallery, menu);
      super.onCreateOptionsMenu(menu, inflater);
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
  
      switch (item.getItemId()) {
          case R.id.create_new:
              Toast.makeText(getActivity(),
                      "It worked ",
                      Toast.LENGTH_SHORT).show();
              return true;
          default:
              return super.onOptionsItemSelected(item);
      }
  }
  </code></pre>
  
  <p>If anybody know what do I do wrong please response.</p>