2
votes

Im developing an android application with minimum API Level 10 (2.3.3) and im using the toolbar as my actionbar. Both the home icon and the overflow icon and also the title text color are white on Honeycomb and above which is what i want. The problem is on below honeycomb, the home icon, the overflow icon and the titleColor are black and i want them also be white. How do i go about doing this. Below is my code.

styles.xml

<style name="Theme.DesignDemo" parent="Base.Theme.DesignDemo">
</style>

<style name="Base.Theme.DesignDemo" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="colorPrimary">@color/primary</item>
    <item name="colorPrimaryDark">@color/primaryDark</item>
    <item name="colorAccent">@color/accent</item>
    <item name="android:windowBackground">@color/window_background</item>
    <item name="android:windowAnimationStyle">@style/MyAwesomeAnimation</item>
</style>

toolbar

<android.support.design.widget.AppBarLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

<android.support.v7.widget.Toolbar
    android:id="@+id/toolbar"
    android:layout_width="match_parent"
    android:layout_height="?attr/actionBarSize"
    android:background="?attr/colorPrimary"
    app:layout_scrollFlags="scroll|enterAlways"
    app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

1
Did you sort your issue with this in the end?QuantumTiger

1 Answers

0
votes

I was having the exact same issue. Both the overflow and the homeAsUp icons were black in API level 11 and below. The following additional line in the application theme solved the problem

<item name="android:textColorSecondary">@android:color/white</item>

See also AppCompat Toolbar: Change Overflow Icon Color in ActionMode