title: Changing the navigation bar color programmatically on LG Q6
body: <p>I try to change the color of the navigation bar, either via a theme, or programmatically.</p>
  
  <p>Here is what I tried so far:</p>
  
  <p>in style-v21:</p>
  
  <pre><code>&lt;style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"&gt;
      &lt;item name="colorPrimary"&gt;#123456&lt;/item&gt;
      &lt;item name="colorPrimaryDark"&gt;#012345&lt;/item&gt;
      &lt;item name="colorAccent"&gt;#987654&lt;/item&gt;
      &lt;item name="android:windowDrawsSystemBarBackgrounds"&gt;true&lt;/item&gt;
      &lt;item name="android:navigationBarColor"&gt;@color/colorAccent&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>programmatically:</p>
  
  <pre><code>Window w = getWindow();
  w.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
  w.setNavigationBarColor(ContextCompat.getColor(this, R.color.colorAccent));
  </code></pre>
  
  <p>The problem is: it works perfectly on Nexus devices (with Android 7.1.1), <strong>but not on a LG Q6</strong> (also with Android 7.1.1).</p>
  
  <p>I think there is a way to do it (since the Youtube app has its own navigation bar color), but I don't know how.</p>
  
  <p>I also tried pretty much everything <a href="https://stackoverflow.com/questions/27348336/how-to-change-system-navigation-bar-color">here</a>, <a href="https://stackoverflow.com/questions/41303597/android-change-navigation-bar-color">here</a>, <a href="https://stackoverflow.com/questions/47960026/how-change-navigation-bar-color">here</a>, <a href="https://stackoverflow.com/questions/27839105/android-lollipop-change-navigation-bar-color">here</a> and <a href="https://stackoverflow.com/questions/27589833/change-navigation-bar-color-android/33595625">here</a>, with no success.</p>
  
  <p>Thanks for your help!</p>