title: Why does setting android:background on a Button cause loss of L/R padding?
body: <p>I am using Android Studio 2.2.1 with project with these settings:</p>
  
  <pre><code>compileSdkVersion 24
  buildToolsVersion "24.0.2"
  minSdkVersion 16
  targetSdkVersion 24
  </code></pre>
  
  <p>If I use the GUI to change the button background, it adds this to the layout:</p>
  
  <pre><code>android:background="@color/colorPrimary"
  </code></pre>
  
  <p>Then, if I run the app on a 4.4 virtual device (Microsoft's Android Emulator because I'm on an AMD system and I want a fast emulator), or on a Samsung Galaxy S6 with Android 6.0.1, the button has the correct color but loses left and right padding and the text runs right to the left and right edge of the button.</p>
  
  <p>If I set only the backgroundTint, then the button has the correct padding on the virtual device, but not the correct color.  However, on the S6, it has the correct color and padding.</p>
  
  <p>This seems like a bug somewhere, but where?  Is it in the code generation or is this a bug in Android 4.4?  </p>
  
  <p>I think Android Studio should be doing whatever needed to make it work correct on both platform levels, whether it is as complex as some of these solutions:</p>
  
  <p><a href="https://stackoverflow.com/questions/1521640/standard-android-button-with-a-different-color">Standard Android Button with a different color</a></p>
  
  <p>or something more succinct.</p>
  
  <p>My styles.xml file shows:</p>
  
  <pre><code>&lt;resources&gt;
  
      &lt;!-- Base application theme. --&gt;
      &lt;style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"&gt;
          &lt;!-- Customize your theme here. --&gt;
          &lt;item name="colorPrimary"&gt;@color/colorPrimary&lt;/item&gt;
          &lt;item name="colorPrimaryDark"&gt;@color/colorPrimaryDark&lt;/item&gt;
          &lt;item name="colorAccent"&gt;@color/colorAccent&lt;/item&gt;
      &lt;/style&gt;
  
  &lt;/resources&gt;
  </code></pre>
  
  <p>and my AndroidManifest theme setting is:</p>
  
  <pre><code>&lt;application
      android:allowBackup="true"
      android:icon="@mipmap/ic_launcher"
      android:label="@string/app_name"
      android:supportsRtl="true"
      android:theme="@style/AppTheme"
  </code></pre>