Android theme will not update status bar color
<p>I'm struggling to get Android to update my status bar color. I'm using <code>AppCompatActivity</code> in Xamarin.Android.</p>

<p>My <code>values/styles.xml</code> file is like so:</p>

<pre><code>&lt;!-- Main theme --&gt;
&lt;style name="MainTheme" parent="MainTheme.Base"&gt;
&lt;/style&gt;
&lt;style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar"&gt;
  &lt;item name="windowNoTitle"&gt;true&lt;/item&gt;
  &lt;item name="windowActionBar"&gt;false&lt;/item&gt;
  &lt;item name="android:windowBackground"&gt;@color/WindowBackground&lt;/item&gt;
  &lt;item name="colorPrimary"&gt;@color/Primary&lt;/item&gt;
  &lt;item name="colorPrimaryDark"&gt;@color/PrimaryDark&lt;/item&gt;
  &lt;item name="colorAccent"&gt;@color/Accent&lt;/item&gt;
  &lt;item name="android:textColorPrimary"&gt;@color/PrimaryText&lt;/item&gt;
  &lt;item name="android:textColorSecondary"&gt;@color/SecondaryText&lt;/item&gt;
&lt;/style&gt;
</code></pre>

<p>Inside of <code>values-v21/styles.xml</code>, I have the following:</p>

<pre><code>&lt;!-- Main theme --&gt;
&lt;style name="MainTheme" parent="MainTheme.Base"&gt;
  &lt;item name="android:windowTranslucentStatus"&gt;false&lt;/item&gt;
  &lt;item name="android:windowDrawsSystemBarBackgrounds"&gt;true&lt;/item&gt;
  &lt;item name="android:statusBarColor"&gt;@color/PrimaryDark&lt;/item&gt;
&lt;/style&gt;
</code></pre>

<p>However, the status bar will not update. If I use this however, from <code>OnCreate()</code>, the color updates just fine:</p>

<pre><code>protected virtual void SetupStatusBar()
{
    if (Build.VERSION.SdkInt &lt; BuildVersionCodes.Lollipop)
        return;

    Window.ClearFlags(WindowManagerFlags.TranslucentStatus);

    Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds);

#pragma warning disable 618
    Window.SetStatusBarColor(Resources.GetColor(Resource.Color.PrimaryDark));
#pragma warning restore 618
}
</code></pre>

<p>I'm a bit confused, because all I'm doing is copying the XML directives.</p>

<p>I'm using a Galaxy Tab S2 running Android 5.1.1, which is API 22, and should trigger the <code>v21</code> style override, I'd think.</p>