title: Android default button color
body: <p>When I open a new android studio project, the default color for button is purple. I want the default color to be the gray default button color(I assume you know what I mean). I tried to change the color via xml and java and nothing worked. I want that the default button color will be gray without I'd have to change it every time.
  <a href="https://i.stack.imgur.com/jVyKc.png" rel="noreferrer"><img src="https://i.stack.imgur.com/jVyKc.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/TF8Lh.png" rel="noreferrer"><img src="https://i.stack.imgur.com/TF8Lh.png" alt="enter image description here" /></a></p>
  <p>themse.xml:</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.HangmanGame&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;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;!-- 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;
  </code></pre>
  
  <p>themes.xml(night)</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.HangmanGame&quot; parent=&quot;Theme.MaterialComponents.DayNight.DarkActionBar&quot;&gt;
      &lt;!-- Primary brand color. --&gt;
      &lt;item name=&quot;colorPrimary&quot;&gt;@color/purple_200&lt;/item&gt;
      &lt;item name=&quot;colorPrimaryVariant&quot;&gt;@color/purple_700&lt;/item&gt;
      &lt;item name=&quot;colorOnPrimary&quot;&gt;@color/black&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_200&lt;/item&gt;
      &lt;item name=&quot;colorOnSecondary&quot;&gt;@color/black&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;
  </code></pre>