title: Customize background color of Theme: Theme.AppCompat.NoActionBar
body: <p>I've used inbuilt theme <code>Theme.AppCompat.NoActionBar</code> for my app. But it gives complete black background. I want to change this black background to gray one. So I tried to customize my theme as following:</p>
  <p>Here is my styles.xml</p>
  <pre><code>&lt;resources&gt;
  
  &lt;!-- Base application theme. --&gt;
  &lt;style name=&quot;AppTheme&quot; parent=&quot;MyTheme&quot;&gt;    // Using Customized theme.
      &lt;!-- Customize your theme here. --&gt;
      &lt;item name=&quot;colorPrimary&quot;&gt;@color/colorPrimary&lt;/item&gt;
      &lt;item name=&quot;colorPrimaryDark&quot;&gt;@color/colorPrimaryDark&lt;/item&gt;
      &lt;item name=&quot;colorAccent&quot;&gt;@color/colorAccent&lt;/item&gt;
  &lt;/style&gt;
  
  //Customize the Theme.
  
  &lt;style name=&quot;MyTheme&quot; parent=&quot;Theme.AppCompat.NoActionBar&quot;&gt; 
      &lt;item name=&quot;android:backgroundDimAmount&quot;&gt;0.8&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>Here I want to lighten my background color so I'm using <code>android:backgroundDimAmount</code>  but it is not working.</p>
  <p>I've also used following:</p>
  <pre><code>&lt;style name=&quot;MyTheme&quot; parent=&quot;Theme.AppCompat.NoActionBar&quot;&gt; 
      &lt;item name=&quot;android:background&quot;&gt;#707070&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  <p>This changes the background color, but gives me weird results as following screen shot:</p>
  <p><a href="https://i.stack.imgur.com/Xucor.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Xucor.png" alt="enter image description here" /></a></p>
  <p>Where as My actual activity looks like following screen shot:</p>
  <p><a href="https://i.stack.imgur.com/Jolj1.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Jolj1.png" alt="enter image description here" /></a></p>
  <p>So my question how can I lighten or possibly change the background color?</p>