1

I have a toolbar defined like so:

<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" >

I have a navigation drawer toggle button on the toolbar enabled in code (the hamburger menu button). I want it to be white but no matter what I do, it never changes color. I saw in an open source app that they set this in the theme:

<item name="colorControlHighlight">@color/white</item>

I tried it, but still no change for me - it's always the dark almost black color.

I am using this open source app for reference since it looks like it has a white menu button: https://github.com/frogermcs/InstaMaterial

I copied it as closely as I could, but my toolbar menu button never changes color. What am I doing wrong?

Barodapride
  • 3,475
  • 4
  • 25
  • 36
  • Is title of your Toolbar also not white? – Sharjeel Sep 22 '15 at 00:36
  • It's white, but I can change it to black depending on the theme. The navigation icon never changes color. – Barodapride Sep 22 '15 at 00:39
  • If it's white then Hamburger Icon should be white as well just like the title unless you are overriding it somewhere in your application by providing your own icon or color. – Sharjeel Sep 22 '15 at 00:41
  • Also see this answer for setting style of Toolbar: http://stackoverflow.com/a/26447144/343679 – Sharjeel Sep 22 '15 at 00:47
  • 1
    That link worked. I had to define drawerArrowStyle in my app's theme. It's confusing because the app compat toolbar does not follow the app theme - for example, you have to manually set its primary color in the toolbar xml. But it does apparently follow the drawerArrowStyle for the navigation icon. – Barodapride Sep 22 '15 at 01:23

1 Answers1

0

Make sure that your style is a parent of Theme.AppCompat.Light.DarkActionBar

also, if you have problems with the popup menu, please add this attribute to the Toolbar view app:popupTheme="@style/ThemeOverlay.AppCompat.Light"

Jefer590
  • 13
  • 3