title: How do I force darken the WebView parent so that I can use WebSettingsCompat.FORCE_DARK_AUTO?
body: <p>I've followed the instructions on this super useful answer <a href="https://stackoverflow.com/a/61643614/704836">https://stackoverflow.com/a/61643614/704836</a> and I have dark mode in the <code>WebView</code> implemented however <code>WebSettingsCompat.FORCE_DARK_AUTO</code> doesn't seem to work when I use <code>AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)</code> and this leads me to believe the documentation is talking about a different way of setting dark mode?</p>
  <p>The documentation here <a href="https://developer.android.com/reference/androidx/webkit/WebSettingsCompat#FORCE_DARK_AUTO" rel="noreferrer">https://developer.android.com/reference/androidx/webkit/WebSettingsCompat#FORCE_DARK_AUTO</a> says:</p>
  <blockquote>
  <p>Enable force dark dependent on the state of the WebView parent view.
  <strong>If the WebView parent view is being automatically force darkened</strong> (@see
  android.view.View#setForceDarkAllowed), then WebView content will be
  rendered so as to emulate a dark theme. WebViews that are not attached
  to the view hierarchy will not be inverted.</p>
  </blockquote>
  <p>I've tried <code>webView.setForceDarkAllowed(true)</code> and <code>android:forceDarkAllowed=&quot;true&quot;</code> on the parent layout and on the <code>WebView</code> and that didn't help.  But as soon as I change to <code>WebSettingsCompat.FORCE_DARK_ON</code> then it works.</p>
  <p>So how can I use <code>FORCE_DARK_AUTO</code>?</p>
  <p>Thanks.</p>