title: Menu not showing up in Activity - Android
body: <p>I have written a code for Menus's in Android but it is now showing up in my activity, here is my code</p>
  
  <p>I am only displaying my relevant code here,</p>
  
  <p><strong>Manifest.xml</strong> <br></p>
  
  <pre><code>&lt;uses-sdk
          android:minSdkVersion="15"
          android:targetSdkVersion="21" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppBaseTheme" &gt;
  </code></pre>
  
  <p><strong>MainActivity.Java</strong></p>
  
  <pre><code>public class MainActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          super.onCreateOptionsMenu(menu);
          getMenuInflater().inflate(R.menu.main, menu);
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          // Handle action bar item clicks here. The action bar will
          // automatically handle clicks on the Home/Up button, so long
          // as you specify a parent activity in AndroidManifest.xml.
          switch (item.getItemId()) {
          // Some action here
  
          }
      }
  }
  </code></pre>
  
  <p>main.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="com.example.androidex1.MainActivity" &gt;
  
     &lt;item android:id="@+id/item1"
         android:title="one" /&gt;
      &lt;item android:id="@+id/item2"
  
          android:title="two" /&gt;
      &lt;item android:id="@+id/item3"
  
          android:title="three" /&gt;
      &lt;item android:id="@+id/item4"
  
          android:title="four" /&gt;
  
  &lt;/menu&gt;
  </code></pre>
  
  <p>Steps tried before</p>
  
  <p><a href="https://stackoverflow.com/questions/18010072/menu-items-are-not-showing-on-action-bar">Menu Items are not showing on Action Bar</a></p>
  
  <p><strong>Result:</strong></p>
  
  <p>Tried but still menu's are not appearing</p>
  
  <p><a href="https://stackoverflow.com/questions/21214627/android-options-menu-not-displaying">Android options menu not displaying</a></p>
  
  <p><strong>Result:</strong></p>
  
  <p>Menu's still don't appear.</p>
  
  <p><a href="https://stackoverflow.com/questions/10051104/android-menu-not-showing-up">Android Menu not showing up</a></p>
  
  <p><strong>Result:</strong></p>
  
  <p>Never added that attribute.</p>
  
  <p><a href="https://stackoverflow.com/questions/12395747/option-menu-does-not-appear-in-android">Option Menu does not appear in Android</a></p>
  
  <p><strong>Result:</strong></p>
  
  <pre><code>super.onCreateOptionsMenu(menu); is also added in the code but still the menu's don't appear.
  </code></pre>
  
  <p>My problem
  I would like to see only the menu not the actionbar, what could be the problem ? I am not getting any errors and the main problem is that I am not able to see the menu itself.</p>