title: Android toolbar night theme stuck on default color
body: <p>When the user activated the system night mode, the toolbar color changes in material dark so the actionbar background is #121212.</p>
  <p>night/themes.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.MyApp&quot; parent=&quot;Theme.AppCompat.Light&quot;&gt;
      &lt;item name=&quot;colorPrimary&quot;&gt;#0069D3&lt;/item&gt;
      &lt;item name=&quot;colorPrimaryVariant&quot;&gt;#0069D3&lt;/item&gt;
      &lt;item name=&quot;colorOnPrimary&quot;&gt;#006BD5&lt;/item&gt;
      &lt;item name=&quot;colorOnSurface&quot;&gt;#006BD5&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;#006BD5&lt;/item&gt;
      &lt;!-- Status bar color. --&gt;
      &lt;item name=&quot;android:statusBarColor&quot;&gt;?attr/colorToolbar&lt;/item&gt;
      &lt;item name=&quot;android:toolbarStyle&quot;&gt;@style/Theme.MyApp.AppBarOverlay&lt;/item&gt;
      &lt;item name=&quot;toolbarStyle&quot;&gt;@style/Theme.MyApp.AppBarOverlay&lt;/item&gt;
      &lt;item name=&quot;actionBarStyle&quot;&gt;@style/Theme.MyApp.ActionBarNight&lt;/item&gt;
      &lt;/style&gt;
  
  &lt;style name=&quot;Theme.MyApp.AppBarOverlay&quot; parent=&quot;ThemeOverlay.AppCompat.Dark.ActionBar&quot;&gt;
      &lt;item name=&quot;backgroundColor&quot;&gt;#006BD5&lt;/item&gt;
      &lt;item name=&quot;android:background&quot;&gt;?attr/colorToolbar&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name=&quot;Theme.MyApp.PopupOverlay&quot; parent=&quot;ThemeOverlay.AppCompat.Dark&quot;&gt;
      &lt;item name=&quot;android:background&quot;&gt;?attr/colorToolbar&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name=&quot;Theme.MyApp.ActionBarNight&quot; parent=&quot;@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse&quot;&gt;
      &lt;item name=&quot;background&quot;&gt;?attr/colorToolbar&lt;/item&gt;
      &lt;item name=&quot;android:background&quot;&gt;?attr/colorToolbar&lt;/item&gt;
      &lt;item name=&quot;titleTextStyle&quot;&gt;@style/MyActionBarTitle&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name=&quot;MyActionBarTitle&quot; parent=&quot;@style/TextAppearance.AppCompat.Widget.ActionBar.Title&quot;&gt;
      &lt;item name=&quot;android:textColor&quot;&gt;@color/white&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>The example activity XML doesn't contain any Toolbar.</p>
  <p>Example activity by manifest:</p>
  <pre><code>&lt;activity android:name=&quot;.ProblemiMateriale&quot;
          android:theme=&quot;@style/Theme.MyApp&quot; /&gt;
  </code></pre>