 <p>We can use sub-menu model. So, we don't need to write method for showing popup menu, it will be showing automacally. Have a look:</p> <p>menu.xml</p> <pre><code>&lt;menu xmlns:android="http://schemas.android.com/apk/res/android" &gt; &lt;item android:id="@+id/action_more" android:icon="@android:drawable/ic_menu_more" android:orderInCategory="1" android:showAsAction="always" android:title="More"&gt; &lt;menu&gt; &lt;item android:id="@+id/action_one" android:icon="@android:drawable/ic_popup_sync" android:title="Sync"/&gt; &lt;item android:id="@+id/action_two" android:icon="@android:drawable/ic_dialog_info" android:title="About"/&gt; &lt;/menu&gt; &lt;/item&gt; &lt;/menu&gt; </code></pre> <p>in MainActivity.java</p> <pre><code>@Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } </code></pre> <p>The result is:</p> <p><a href="https://i.stack.imgur.com/xD9Cj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xD9Cj.png" alt="Result"></a></p>