Forum Xamarin.Android

Statusbar color changes on contextual Actionmode

Michael.4962Michael.4962 USMember ✭✭
edited March 2017 in Xamarin.Android

I have an issue with statusbar color. I changed styles.xml

<?xml version="1.0" encoding="utf-8" ?>
  <color name="colorPrimaryDark">#C85E20</color>
  <color name="colorPrimary">#DF891C</color>
  <color name="colorAccent">#DF891C</color>

  <style name="MainTheme" parent="MainTheme.Base">
  <!-- Base theme applied no matter what API -->
  <style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">

    <!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
    <item name="windowNoTitle">true</item>
    <!--We will be using the toolbar so no need to show ActionBar-->
    <item name="windowActionBar">false</item>
    <!-- Set theme colors from -->
    <!-- colorPrimary is used for the default action bar background -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <!-- colorPrimaryDark is used for the status bar -->
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <!-- colorAccent is used as the default value for colorControlActivated
         which is used to tint widgets -->
    <item name="colorAccent">@color/colorAccent</item>
    <!-- You can also set colorControlNormal, colorControlActivated
         colorControlHighlight and colorSwitchThumbNormal. -->
    <item name="windowActionModeOverlay">true</item>

    <item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>

    <item name="actionModeStyle">@style/ContextActionMode</item>

  <style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
    <item name="colorAccent">@color/colorAccent</item>

  <style name="ContextActionMode" parent="@style/Widget.AppCompat.ActionMode">
    <item name="background">@color/colorPrimaryDark</item>


and the Toolbar.axml file is the following:

<?xml version="1.0" encoding="utf-8"?>
< xmlns:android=""
    android:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

now, the behavior in normal mode is right, statusbar in colorPrimaryDark as expected

but when I press and hold an item in a listview and contextual menu items appears, the statusbar become black:

other colors are correct......I don't know what I'm doing wrong :(

thanks to everyone can help me! :(


  • Michael.4962Michael.4962 USMember ✭✭

    any tips? i don't know how to solve this...

    maybe acting on toolbar.xml can help?

Sign In or Register to comment.