title: AppCompat Button Without Elevation
body: <p>I have a few dozen buttons in my app and a style that inherits from <code>Widget.AppCompat.Button</code>. Most of the buttons have an elevation and state change animation. Awesome.</p>
  
  <p>What isn't awesome is that a few of the buttons don't have anything of that extra goodness.</p>
  
  <p>Here's an example of one of the working buttons</p>
  
  <pre><code>&lt;Button
      android:id="@+id/button1"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginBottom="?attr/defaultPadding"
      android:minHeight="?attr/minTouchSize"
      android:textAppearance="?attr/textAppearanceListRowLabel" /&gt;
  </code></pre>
  
  <p>Here's a snippet from where the buttons do NOT work</p>
  
  <pre><code>&lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;
  
      &lt;Button
          android:id="@+id/button2"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_marginEnd="8dp"
          android:layout_marginRight="8dp"
          android:layout_weight="1"
          android:minHeight="?attr/minTouchSize" /&gt;
  
      &lt;Button
          android:id="@+id/button3"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_weight="1"
          android:minHeight="?attr/minTouchSize" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>These are on separate layouts. Things I've tried:</p>
  
  <ul>
  <li>I've added <code>button1</code> to be in the same layout file as the button bar and <code>button1</code> still works.</li>
  <li>If I remove the weights from one of the buttons in the bar they don't work.</li>
  <li>I've tried explicitly putting my button style on each button</li>
  <li>If I make the button bar a vertical layout <strong>and</strong> make the buttons match parent then it works! But that isn't what I want.</li>
  </ul>
  
  <p>I want to make these buttons have state animation and elevation while in a horizontal layout. Aka I want the buttons to take up equal space and sit next two each other. How can I achieve this?</p>
  
  <p>I'm using appcompat 22.2.1</p>