title: Colors of the status bar using the DayNight theme in android
body: <p>I am applying the theme Theme.AppCompat.DayNight.NoActionBar to my application.</p>
  <p>In the light theme, I want the status bar to be white and in the dark theme, I want it to be dark.</p>
  <p>I can't get the status bar to be white and the letters to be dark and vice versa.</p>
  <p>This is my style:</p>
  <pre><code> &lt;style name=&quot;AppTheme.Base&quot; parent=&quot;Theme.AppCompat.DayNight.NoActionBar&quot;&gt;
          &lt;item name=&quot;colorPrimary&quot;&gt;@color/primary&lt;/item&gt;
          &lt;item name=&quot;colorPrimaryDark&quot;&gt;@color/primary_dark&lt;/item&gt;
          &lt;item name=&quot;android:windowDrawsSystemBarBackgrounds&quot;&gt;true&lt;/item&gt;
          &lt;item name=&quot;android:windowNoTitle&quot;&gt;true&lt;/item&gt;
          &lt;item name=&quot;windowActionBar&quot;&gt;false&lt;/item&gt;
          &lt;item name=&quot;colorControlNormal&quot;&gt;@color/primary_dark&lt;/item&gt;
          &lt;item name=&quot;colorControlHighlight&quot;&gt;@color/primary_dark&lt;/item&gt;
          &lt;item name=&quot;android:textColorPrimary&quot;&gt;@color/letter_medium_emphasis&lt;/item&gt;
          &lt;item name=&quot;android:textColorSecondary&quot;&gt;@color/letter_high_emphasis&lt;/item&gt;
      &lt;/style&gt;
  </code></pre>
  <p>and this is my color file:</p>
  <pre><code>&lt;resources&gt;
      &lt;color name=&quot;primary&quot;&gt;#ffffff&lt;/color&gt;
      &lt;color name=&quot;primary_dark&quot;&gt;#0336ff&lt;/color&gt;
      &lt;color name=&quot;letter_high_emphasis&quot;&gt;#de000000&lt;/color&gt;
      &lt;color name=&quot;letter_medium_emphasis&quot;&gt;#99000000&lt;/color&gt;
      &lt;color name=&quot;letter_medium_disabled&quot;&gt;#61000000&lt;/color&gt;
  &lt;/resources&gt;
  </code></pre>
  <p>I have tried adding the parameter
  <code>&lt;item name=&quot;android:statusBarColor&quot;&gt;@color/primary&lt;/item&gt;</code><br />
  But I still get the same thing, the status bar is white and the status bar text is also white.</p>
  <p>What is the way to show the white status bar with dark letters in the light theme and vice versa in the dark theme?</p>