title: How to add a button to actionbar?
body: <p>I have tried adding it by looking at various guides and stackOverflow topics, but they didn't help. I do everything as various guides say, but I am still unable to get settings icon at the action bar. MainActivity.class:</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      ActionBar actionBar = getSupportActionBar();
  
      actionBar.setDisplayHomeAsUpEnabled(true);
  
      if (savedInstanceState == null) {
          getSupportFragmentManager().beginTransaction()
                  .add(R.id.container, new PlaceholderFragment())
                  .commit();
      }
  }
  
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      MenuInflater inflater = getMenuInflater();
      inflater.inflate(R.menu.entry_test, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item){
      Intent myIntent = new Intent(getApplicationContext(),MainActivity.class);
      startActivityForResult(myIntent, 0);
      return true;
  }
  </code></pre>
  
  <p>entry_test.xml (this is where the icon is):</p>
  
  <pre><code>    &lt;menu xmlns:android="http://schemas.android.com/apk/res/android" &gt;
          &lt;item
              android:id="@+id/action_cart"
              android:icon="@drawable/ic_action_settings"
              android:orderInCategory="100"
              android:showAsAction="always"
              android:title="Settings"
  /&gt;
  
  &lt;/menu&gt;
  </code></pre>
  
  <p>The icon is not displayed in the action bar and when pressing "more" button (or whatever it is called), a button appears at the bottom saying Settings (title of it). Thats it.
  What am I doing wrong?</p>