title: Custom actionbar layout with overflow menu
body: <p>I use the <code>actionbarsherklock</code> library with custom action bar look like this:</p>
  
  <p><img src="https://i.stack.imgur.com/WcL4R.png" alt="enter image description here"></p>
  
  <p>My custom implement:</p>
  
  <pre><code>  ActionBar actionBar = getSupportActionBar();
      actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
  
      // Do any other config to the action bar
      getSupportActionBar().setDisplayShowTitleEnabled(false);
      getSupportActionBar().setDisplayShowHomeEnabled(false);
      getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  
      // set custom view
      View actionBarView = getLayoutInflater().inflate(
              R.layout.action_bar_default, null);
  
      View btnMenuLeft= actionBarView.findViewById(R.id.btnMenuLeft);
      btnMenuLeft.setOnClickListener(new OnClickListener() {
  
          @Override
          public void onClick(View v) {
              toggle();
          }
      });
  
      View btnMenuShare= actionBarView.findViewById(R.id.btnMenuShare);
      ActionBar.LayoutParams params = new ActionBar.LayoutParams(
              LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
      actionBar.setCustomView(actionBarView, params);
  
      // Hide the home icon
      actionBar.setIcon(android.R.color.transparent);
      actionBar.setLogo(android.R.color.transparent);
  </code></pre>
  
  <p>And here is the custom layout:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:background="@drawable/nav_bar_bg"
  android:gravity="center"
  android:orientation="horizontal" &gt;
  
  &lt;!-- menu button --&gt;
      &lt;ImageButton
          android:id="@+id/btnMenuLeft"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="@drawable/list_btn"
          android:clickable="false"
          android:duplicateParentState="true"
          android:focusable="false" /&gt;
  
      &lt;!-- logo --&gt;
      &lt;ImageView       
      android:layout_width="0dp"
      android:layout_height="wrap_content"
      android:layout_gravity="center"
      android:layout_weight="1"
      android:src="@drawable/app_logo" /&gt;
  
      &lt;!-- share button --&gt;
      &lt;ImageButton
           android:id="@+id/btnMenuShare"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="@drawable/action_btn"
          android:clickable="false"
          android:duplicateParentState="true"
          android:focusable="false" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>The problem is that I want add an over flow menu to share button like this one:</p>
  
  <p><img src="https://i.stack.imgur.com/lJMnc.png" alt="enter image description here"> </p>
  
  <p>Please tell me how can I do that with the custom action bar layout.</p>