Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Background color of "ActionBar"/"Toolbar v7" with FormsAppCompatActivity

$
0
0

Hi there,

I finally figured out I should migrate from FormsApplicationActivity to FormsAppCompatActivity. After doing that and adapting a few configuration options here and there, my theme is now as follows:

  <style name="CustomTheme" parent="CustomTheme.Base">
  </style>

  <style name="CustomTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
    <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 http://www.google.com/design/spec/style/color.html#color-color-palette-->
    <!-- colorPrimary is used for the default action bar background -->
    <item name="colorPrimary">@color/primary</item>
    <!-- colorPrimaryDark is used for the status bar -->
    <item name="colorPrimaryDark">@color/primary_dark</item>
    <!-- colorAccent is used as the default value for colorControlActivated
         which is used to tint widgets -->
    <item name="colorAccent">@color/accent</item>
    <!-- You can also set colorControlNormal, colorControlActivated
         colorControlHighlight and colorSwitchThumbNormal. -->
    <!--item name="colorControlHighlight">@color/primary_light</item-->
    <!--item name="colorControlActivated">@color/primary_light</item-->
    <!--item name="colorLongPressedHighlight">@color/listitem_longpressed</item-->
  </style>

That's dumb but I don't figure out how to get back a dark actionbar:

It does not look dark at all, since it's white background with black text...


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>