title: android:foreground attribute / setForeground() method does not work with Button elements
body: <p>Since <a href="https://github.com/aosp-mirror/platform_frameworks_base/blob/master/core/java/android/view/View.java#L5113" rel="nofollow noreferrer">Android 23</a>, the <code>android:foreground</code> XML attribute (and corresponding <code>setForeground()</code> <a href="https://developer.android.com/reference/android/view/View.html#setForeground(android.graphics.drawable.Drawable)" rel="nofollow noreferrer">method</a>) should be available to all Views, and not just FrameLayout instances as was previously the case. </p>
  
  <p>Yet, for some reason, whenever I create a Button instance which inherits from TextView -> View, I can't seem to get a foreground to show at all.</p>
  
  <p>Here is an example button definition that doesn't work appear to show the foreground:</p>
  
  <pre><code>    &lt;Button
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginEnd="10dp"
        android:text="Primary Full Width"
        style="@style/Button.Primary" /&gt;
  </code></pre>
  
  <p>And here is the defintion of the <code>Button.Primary</code> style:</p>
  
  <pre><code>    &lt;style name="Button.Primary" parent="Widget.AppCompat.Button"&gt;
        &lt;item name="android:background"&gt;@drawable/button_primary_background_selector&lt;/item&gt;
        &lt;item name="android:foreground"&gt;@drawable/button_primary_foreground_selector&lt;/item&gt;
        &lt;item name="android:textAppearance"&gt;@style/TextAppearance.FF.Button&lt;/item&gt;
        &lt;item name="android:minHeight"&gt;80dp&lt;/item&gt;
        &lt;item name="android:height"&gt;80dp&lt;/item&gt;
        &lt;item name="android:minWidth"&gt;200dp&lt;/item&gt;
        &lt;item name="android:defaultWidth"&gt;288dp&lt;/item&gt;
        &lt;item name="android:maxWidth"&gt;400dp&lt;/item&gt;
        &lt;item name="android:focusable"&gt;true&lt;/item&gt;
        &lt;item name="android:clickable"&gt;true&lt;/item&gt;
        &lt;item name="android:gravity"&gt;center_vertical|center_horizontal&lt;/item&gt;
        &lt;item name="android:paddingStart"&gt;70dp&lt;/item&gt;
        &lt;item name="android:paddingEnd"&gt;70dp&lt;/item&gt;
        &lt;item name="android:stateListAnimator"&gt;@null&lt;/item&gt;
        &lt;item name="android:singleLine"&gt;true&lt;/item&gt;
        &lt;item name="android:ellipsize"&gt;end&lt;/item&gt;
        &lt;item name="android:drawablePadding"&gt;10dp&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>I've confirmed that setting the <code>foreground</code> attribute in the style or in the <code>&lt;Button&gt;</code> definition does not change anything, the foreground fails to show regardless. The background shows correctly, as does the text, it's just the foreground that's missing. </p>
  
  <p>I've also tried setting the foreground to a solid color instead of a state selector drawable, with no success.</p>