title: Show overflow menu on Image button click
body: <p>I want to show the Overflow menu on <code>ImageButton</code> click.</p>
  
  <p>menu/menu_scrollable_tab.xml</p>
  
  <pre><code>&lt;menu xmlns:android="http://schemas.android.com/apk/res/android"
      tools:context="com.example.scrollingtab.activity.ScrollableTabsActivity"&gt;
  
      &lt;item android:id="@+id/action_settings" 
          android:title="@string/action_settings"
          android:orderInCategory="100" 
          app:showAsAction="always"
          android:icon="@drawable/info" /&gt;
  
        &lt;item android:id="@+id/action_settings1" 
          android:title="@string/action_settings"
          android:orderInCategory="100" 
          app:showAsAction="never" /&gt;
  
          &lt;item android:id="@+id/action_settings2" 
          android:title="@string/action_settings"
          android:orderInCategory="100" 
          app:showAsAction="never" /&gt;
  &lt;/menu&gt;
  </code></pre>
  
  <p>I have disabled the default Action bar and created Action bar using layout. I am not using default action bar or toolbar since i need to customize the action bar more.</p>
  
  <p>layout/actionbar.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="50dp" &gt;
   &lt;LinearLayout      
       android:layout_width="fill_parent"
       android:layout_height="50dp"
       android:orientation="horizontal"
       android:background="@color/actionbar_bg"
       android:weightSum="2"&gt;
  
       &lt;ImageButton android:id="@+id/ib_navigation"
           android:background="@drawable/nv_drawer_24x24"
           android:layout_width="0dp"
           android:layout_weight=".3"
           android:layout_height="50dp"/&gt;
  
       &lt;View 
           android:layout_width="0dp"
           android:layout_height="50dp"
           android:layout_weight="1.1"/&gt;
  
       &lt;ImageButton android:id="@+id/ib_navigation1"
           android:background="@drawable/info"
           android:layout_width="0dp"
           android:layout_weight=".3"
           android:layout_height="50dp"/&gt;
  
       &lt;ImageButton android:id="@+id/ib_navigation2"
           android:background="@drawable/ic_drawer"
           android:layout_width="0dp"
           android:layout_weight=".3"
           android:layout_height="50dp"/&gt;     
   &lt;/LinearLayout&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>As per the client requirement I have designed the action bar using layout and the look and feel are good.</p>
  
  <p>The default <code>OnCreateOptionsMenu(Menu menu)</code> method is not populating the overflow menu. Now i want to populate the overflow menu on clicking the <code>ImageButton</code> with <code>id= ib_navigation2</code>. I don't have any idea to implement this. </p>
  
  <p>Can any one help me on doing this.</p>
  
  <p>Thanks</p>