title: Button background color is not showing in my android activity
body: <p>I created a calculator activity as a part of a bigger app, and created a theme, and style for different components. yet, when I assign a background color of orange to the &quot;buttonOperator&quot; styles it doesn't show in the activity on the buttons that are using this style, appreciate explaining to me what i did wrong and maybe how/what tools can be used to troubleshoot such layout problems in android studio if such tools or methods are available.</p>
  <p>below is the code relevant to the issue:</p>
  <p>calculatorActivity.xml</p>
  <pre><code>&lt;\?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
      &lt;LinearLayout 
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      android:background=&quot;@color/light_Black&quot;
      android:orientation=&quot;vertical&quot;
      android:theme=&quot;@style/Theme.UnitConverterAdvance.Calculator&quot;
      tools:context=&quot;.CalculatorActivity&quot;&gt;
  
      &lt;LinearLayout style=&quot;@style/buttonRow&quot;&gt;
  
          &lt;Button
              style=&quot;@style/buttonNumber&quot;
              android:text=&quot;@string/button_7&quot; /&gt;
  
          &lt;Button
              style=&quot;@style/buttonNumber&quot;
              android:text=&quot;@string/button_8&quot; /&gt;
  
          &lt;Button
              style=&quot;@style/buttonNumber&quot;
              android:text=&quot;@string/button_9&quot; /&gt;
  
          &lt;Button
              style=&quot;@style/buttonOperator&quot;
              android:text=&quot;@string/button_division&quot; /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout style=&quot;@style/buttonRow&quot;&gt;
  
          &lt;Button
              style=&quot;@style/buttonNumber&quot;
              android:text=&quot;@string/button_0&quot; /&gt;
  
          &lt;Button
              style=&quot;@style/buttonNumber&quot;
              android:text=&quot;@string/button_dot&quot; /&gt;
  
          &lt;Button
              style=&quot;@style/buttonOperator&quot;
              android:text=&quot;@string/button_equal&quot; /&gt;
  
          &lt;Button
              style=&quot;@style/buttonOperator&quot;
              android:text=&quot;@string/button_plus&quot; /&gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  <p>Style.xml</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;resources&gt;
  
      &lt;style name=&quot;buttonRow&quot;&gt;
          &lt;item name=&quot;android:layout_weight&quot;&gt;1&lt;/item&gt;
          &lt;item name=&quot;android:layout_width&quot;&gt;match_parent&lt;/item&gt;
          &lt;item name=&quot;android:layout_height&quot;&gt;0dp&lt;/item&gt;
      &lt;/style&gt;
  
      &lt;style name=&quot;buttonNumber&quot;&gt;
          &lt;item name=&quot;android:layout_weight&quot;&gt;1&lt;/item&gt;
          &lt;item name=&quot;android:layout_width&quot;&gt;0dp&lt;/item&gt;
          &lt;item name=&quot;android:layout_height&quot;&gt;match_parent&lt;/item&gt;
          &lt;item name=&quot;android:background&quot;&gt;@null&lt;/item&gt;
          &lt;item name=&quot;android:textSize&quot;&gt;25sp&lt;/item&gt;
          &lt;item name=&quot;android:textColor&quot;&gt;@color/white&lt;/item&gt;
      &lt;/style&gt;
  
      &lt;style name=&quot;buttonOperator&quot;&gt;
          &lt;item name=&quot;android:layout_weight&quot;&gt;1&lt;/item&gt;
          &lt;item name=&quot;android:layout_width&quot;&gt;0dp&lt;/item&gt;
          &lt;item name=&quot;android:layout_height&quot;&gt;match_parent&lt;/item&gt;       
          &lt;item name=&quot;backgroundColor&quot;&gt;@color/orange&lt;/item&gt;
          &lt;item name=&quot;android:textSize&quot;&gt;25sp&lt;/item&gt;
          &lt;item name=&quot;android:textColor&quot;&gt;@color/white&lt;/item&gt;
      &lt;/style&gt;
  &lt;/resources&gt;
  </code></pre>
  <p>Theme.xml</p>
  <pre><code>&lt;resources xmlns:tools=&quot;http://schemas.android.com/tools&quot;&gt;
  
  &lt;style name=&quot;Theme.UnitConverterAdvance&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;
  
  &lt;style name=&quot;Theme.UnitConverterAdvance.Calculator&quot; parent=&quot;Theme.AppCompat&quot;&gt;
      &lt;!-- Primary brand color. --&gt;
      &lt;item name=&quot;colorPrimary&quot;&gt;@color/light_Black&lt;/item&gt;
      &lt;item name=&quot;colorPrimaryVariant&quot;&gt;@color/orange&lt;/item&gt;
      &lt;item name=&quot;colorOnPrimary&quot;&gt;@color/white&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;/style&gt;
  
  &lt;/resources&gt;
  </code></pre>