title: Options Menu not displaying on ActionBar
body: <p>I wanted to display <code>Menu</code> in <code>ActionBar</code> using <code>ActionBarActivity</code>.</p>
  
  <p>I am getting options menu while clicking options button instead of displaying in the top of action bar.</p>
  
  <p>I need the options menu at top instead of clicking the options menu from 2.3 onwards</p>
  
  <p><img src="https://i.stack.imgur.com/Kwqmz.png" alt="Here is the image"></p>
  
  <p>My Code :</p>
  
  <pre><code>public class MainActivity extends ActionBarActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      ActionBar actionBar = getSupportActionBar();
      actionBar.setSubtitle("mytest");
      actionBar.setTitle("Testing");
      getSupportActionBar().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.main_action, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      switch (item.getItemId()) {
      case R.id.menu_item_one:
          Toast.makeText(this, "clicked search", Toast.LENGTH_SHORT).show();
          break;
  
      default:
          break;
      }
      return super.onOptionsItemSelected(item);
  }
  
  /**
   * A placeholder fragment containing a simple view.
   */
  public static class PlaceholderFragment extends Fragment {
  
      public PlaceholderFragment() {}
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
          View rootView = inflater.inflate(R.layout.fragment_main, container, false);
          return rootView;
      }
  }
  
  }
  </code></pre>
  
  <p>My XML file :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;menu xmlns:android="http://schemas.android.com/apk/res/android" &gt;
  
  &lt;item
      android:id="@+id/menu_item_one"
      android:icon="@drawable/ic_launcher"
      android:showAsAction="always"
      android:title="@string/action_settings"/&gt;
  &lt;item
      android:id="@+id/menu_item_two"
      android:icon="@drawable/ic_launcher"
      android:showAsAction="always"
      android:title="@string/action_settings"/&gt;
  
  &lt;/menu&gt;
  </code></pre>