title: How to add button in ActionBar(Android)?
body: <p>I want to add a Button to the Action Bar to the right hand side of Example as in this screen shot: </p>
  
  <p><img src="https://i.stack.imgur.com/Xesrl.png" alt="a screenshot of an actionbar with no buttons. the title is &#39;Example&#39;"></p>
  
  <p>I get actionBar in onCreate method as:</p>
  
  <pre><code>ActionBar actionBar = getActionBar();
  actionBar.setDisplayHomeAsUpEnabled(true);
  </code></pre>
  
  <p>and back button(onOptionsItemSelected method) as below: </p>
  
  <pre><code>public boolean onOptionsItemSelected(MenuItem item){
      Intent myIntent = new Intent(getApplicationContext(),MainActivity.class);
      startActivityForResult(myIntent, 0);
      return true;
  }
  </code></pre>
  
  <p>How can I add button?</p>