title: Android material button taking color primary instead of color accent
body: <p>I have my layout button as -</p>
  <pre><code>&lt;com.google.android.material.button.MaterialButton
    android:id=&quot;@+id/save_button&quot;
    style=&quot;@style/buttonView&quot;
    android:text=&quot;Save&quot;
    app:layout_constraintBottom_toBottomOf=&quot;parent&quot;
    app:layout_constraintStart_toStartOf=&quot;parent&quot; /&gt;
  </code></pre>
  <p>In my <code>styles.xml</code>, I have -</p>
  <pre><code>&lt;style name=&quot;buttonView&quot; parent=&quot;Theme.MyTheme&quot;&gt;
          &lt;item name=&quot;android:layout_width&quot;&gt;match_parent&lt;/item&gt;
          &lt;item name=&quot;android:layout_height&quot;&gt;wrap_content&lt;/item&gt;
          &lt;item name=&quot;android:layout_marginStart&quot;&gt;16dp&lt;/item&gt;
          &lt;item name=&quot;android:layout_marginLeft&quot;&gt;16dp&lt;/item&gt;
          &lt;item name=&quot;android:layout_marginTop&quot;&gt;16dp&lt;/item&gt;
          &lt;item name=&quot;android:layout_marginEnd&quot;&gt;16dp&lt;/item&gt;
          &lt;item name=&quot;android:layout_marginRight&quot;&gt;16dp&lt;/item&gt;
      &lt;/style&gt;
  </code></pre>
  <p>In my <code>themes.xml</code>, I have -</p>
  <pre><code>&lt;resources xmlns:tools=&quot;http://schemas.android.com/tools&quot;&gt;
      &lt;!-- Base application theme. --&gt;
      &lt;style name=&quot;Theme.MyTheme&quot; parent=&quot;Theme.MaterialComponents.DayNight.DarkActionBar&quot;&gt;
          &lt;!-- Primary brand color. --&gt;
          &lt;item name=&quot;colorPrimary&quot;&gt;@color/purple_500&lt;/item&gt;
          &lt;item name=&quot;android:textColorPrimary&quot;&gt;@color/black&lt;/item&gt;
          &lt;item name=&quot;colorPrimaryVariant&quot;&gt;@color/purple_700&lt;/item&gt;
          &lt;item name=&quot;colorOnPrimary&quot;&gt;@color/white&lt;/item&gt;
          &lt;!-- Secondary brand color. --&gt;
          &lt;item name=&quot;colorSecondary&quot;&gt;@color/teal_200&lt;/item&gt;
          &lt;item name=&quot;colorSecondaryVariant&quot;&gt;@color/teal_700&lt;/item&gt;
          &lt;item name=&quot;colorOnSecondary&quot;&gt;@color/black&lt;/item&gt;
          &lt;!--- Accent color. --&gt;
          &lt;item name=&quot;colorAccent&quot;&gt;@color/red&lt;/item&gt;
          &lt;!-- Status bar color. --&gt;
          &lt;item name=&quot;android:statusBarColor&quot; tools:targetApi=&quot;l&quot;&gt;?attr/colorPrimaryVariant
          &lt;/item&gt;
          &lt;!-- Customize your theme here. --&gt;
      &lt;/style&gt;
  &lt;/resources&gt;
  </code></pre>
  <p>As per the Android documentation all the UI elements such as FAB, textview, edit text, button take the color accent. So I expect my button to take the <code>colorAccent</code> by default but why does it take <code>colorPrimary</code>. Am I doing anything wrong?</p>