title: How to make style="?attr/actionButtonStyle" workable for rectangle toolbar button
body: <p>In our previous holo designed app (<code>targetSdkVersion</code> 21, with theme <code>Theme.Sherlock.Light.DarkActionBar</code>), we are using system style attribute <strong><code>attr/actionButtonStyle</code></strong> to define our custom action bar button style.</p>
  
  <h2>actionbar_custom_view_done_discard.xml</h2>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="horizontal"&gt;
      &lt;include layout="@layout/actionbar_discard_button" /&gt;
      &lt;View
          android:layout_width="1px"
          android:layout_height="match_parent"
          android:layout_marginTop="12dp"
          android:layout_marginBottom="12dp"
          android:background="?attr/actionBarCustomViewDividerColor" /&gt;    
      &lt;include layout="@layout/actionbar_done_button" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <h2>actionbar_done_button.xml</h2>
  
  <pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
      style="?attr/actionButtonStyle"
      android:id="@+id/actionbar_done"
      android:layout_width="0dp"
      android:layout_height="match_parent"
      android:layout_weight="1"&gt;
  
      &lt;TextView style="?attr/actionBarTabTextStyle"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center"
          android:paddingRight="20dp"
          android:drawableLeft="?attr/actionBarDoneIcon"
          android:drawablePadding="8dp"
          android:gravity="center_vertical"
          android:text="@string/save" /&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <h2>StockAlertFragmentActivity.java</h2>
  
  <pre><code>public class StockAlertFragmentActivity extends SherlockFragmentActivity {
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          // Inflate a "Done/Discard" custom action bar view.
          LayoutInflater inflater = (LayoutInflater) this.getSupportActionBar().getThemedContext()
                  .getSystemService(LAYOUT_INFLATER_SERVICE);
          final View customActionBarView = inflater.inflate(
                  R.layout.actionbar_custom_view_done_discard, null);
  </code></pre>
  
  <p>The outcome is as following, when we tap on the <strong>SAVE</strong> button.</p>
  
  <p><a href="https://i.stack.imgur.com/W85Nu.png" rel="noreferrer"><img src="https://i.stack.imgur.com/W85Nu.png" alt="enter image description here"></a></p>
  
  <p>However, after migrating our app to material designed app (<code>targetSdkVersion</code> 23, theme <code>Theme.AppCompat.Light.NoActionBar</code>), system attribute <strong><code>attr/actionButtonStyle</code></strong> no longer work well with rectangle button.</p>
  
  <p>Instead, it draws a round overlay on the top of rectangle button.</p>
  
  <h2>toolbar_with_save_discard.xml</h2>
  
  <pre><code>&lt;android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:id="@+id/toolbar"
      android:layout_height="wrap_content"
      android:layout_width="match_parent"
      android:minHeight="?attr/actionBarSize"
      android:background="?attr/colorPrimary"
      android:elevation="4dp"
      android:contentInsetLeft="0dp"
      android:contentInsetStart="0dp"
      app:contentInsetLeft="0dp"
      app:contentInsetStart="0dp"
      android:contentInsetRight="0dp"
      android:contentInsetEnd="0dp"
      app:contentInsetRight="0dp"
      app:contentInsetEnd="0dp"
      app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
      app:popupTheme="@style/ThemeOverlay.AppCompat.Light" &gt;
  
      &lt;!-- android:elevation="4dp" is used due to http://www.google.com/design/spec/what-is-material/elevation-shadows.html#elevation-shadows-elevation-android- --&gt;
  
      &lt;LinearLayout
          android:id="@+id/buttons_linear_layout"
          android:layout_width="match_parent"
          android:layout_height="?attr/actionBarSize"
          android:orientation="horizontal"&gt;
          &lt;include layout="@layout/toolbar_discard_button" /&gt;
          &lt;View
              android:layout_width="1px"
              android:layout_height="match_parent"
              android:layout_marginTop="12dp"
              android:layout_marginBottom="12dp"
              android:background="?attr/toolbarCustomViewDividerColor" /&gt;
          &lt;include layout="@layout/toolbar_save_button" /&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/android.support.v7.widget.Toolbar&gt;
  </code></pre>
  
  <h2>toolbar_save_button.xml</h2>
  
  <pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
      style="?attr/actionButtonStyle"
      android:id="@+id/toolbar_save"
      android:layout_width="0dp"
      android:layout_height="match_parent"
      android:layout_weight="1"&gt;
  
      &lt;TextView style="?attr/actionBarTabTextStyle"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center"
          android:paddingRight="20dp"
          android:drawableLeft="?attr/toolbarDoneIcon"
          android:drawablePadding="8dp"
          android:gravity="center_vertical"
          android:text="@string/save" /&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/8WGPi.png" rel="noreferrer"><img src="https://i.stack.imgur.com/8WGPi.png" alt="enter image description here"></a></p>
  
  <p>I like to have the overlay drawn on the entire rectangle <strong>SAVE</strong> button.</p>
  
  <p>I think most probably I can solve this, by avoiding from using <code>style="?attr/actionButtonStyle"</code>, and supplying my very own defined selector.</p>
  
  <p>However, I prefer not to do so. I prefer to use system provided style, for less maintenance headache.</p>
  
  <hr>
  
  <p><strong><em>How can I make <code>style="?attr/actionButtonStyle"</code> workable for rectangle toolbar button?</em></strong></p>
  
  <p><strong><em>Or, Is there any other system style attribute, which will work well with rectangle toolbar button? At the same time, having ripple effect.</em></strong></p>
  
  <hr>