3

I have Application Theme Theme.AppCompat.Light.NoActionBar which gives light theme to my App, so texts on Dialogs etc are dark. I want also my Toolbar have dark background and light foreground, so i write these to Toolbar:

app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"

Problem: This makes Toolbar dark and texts, back icon white on Lollipop, but does NOT work on KitKat:

Lollipop:

enter image description here


KitKat: enter image description here

Question: How to make Dark Toolbar with Light content on KitKat with my current theme Theme.AppCompat.Light.NoActionBar ?

Jemshit
  • 9,501
  • 5
  • 69
  • 106

1 Answers1

0

Try this:

<style name="MyToolbarStyle" parent="Theme.AppCompat.Light">
    <!-- Used to for the title of the Toolbar -->
    <item name="android:textColorPrimary">#fff</item>
    <!-- Used to for the title of the Toolbar when parent is Theme.AppCompat.Light -->
    <item name="android:textColorPrimaryInverse">#fff</item>
    <!-- Used to color the text of the action menu icons -->
    <item name="android:textColorSecondary">#fff</item>
    <!-- Used to color the overflow menu icon -->
    <item name="actionMenuTextColor">#fff</item>
    <!-- Color of the Toolbar -->
    <item name="android:background">#455a64</item>
</style>

Check out this post:

Android Theme.AppCompat.Light with Dark Toolbar (for light text)

Community
  • 1
  • 1
Strider
  • 4,452
  • 3
  • 24
  • 35
  • yeah i've read this before, this is for changing just text color, which didn't work for me don't know why) My aim is to change back icon color as well – Jemshit Feb 11 '16 at 12:39