0

I have searched how to change the icon color but i have no success on it.

this is my style.xml

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
    <item name="actionBarStyle">@style/MyActionBar</item>
    <item name="android:actionBarStyle">@style/MyActionBar</item>
    <item name="android:actionBarDivider">@android:color/transparent</item>
    <item name="android:actionBarTabBarStyle">@style/AppTheme.TabBar</item>
    <item name="actionBarTabBarStyle">@style/AppTheme.TabBar</item>
    <item name="colorPrimary">@color/main_organization_base_color_1</item>
    <item name="colorPrimaryDark">@color/main_organization_color</item>
    <item name="colorAccent">@color/main_organization_base_color_2</item>
    <item name="android:textColorPrimary">@color/text_color_primary</item>
    <item name="android:textColorSecondary">@color/palette_flat_asphalt_3</item>
    <item name="android:colorBackground">@color/default_bg_color</item>
    <item name="android:windowBackground">@color/default_bg_color</item>
    <item name="android:textColorPrimaryInverse">@color/text_color_primary_inverse</item>
    <item name="colorControlNormal">@color/color_control_normal</item>
</style>

<style name="MyActionBar" parent="@style/Widget.AppCompat.ActionBar.Solid">
    <item name="titleTextStyle">@style/MyTitleTextStyle</item>
    <item name="background">@color/action_background_color</item>
</style>

<style name="MyTitleTextStyle" parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Title">
    <item name="android:textColor">@color/white</item>
</style>

But icon keeps appearing in black color when none of those colors are black or dark. (just colorPrimaryDark is dark blue)

Ninja Coding
  • 1,357
  • 1
  • 16
  • 26
  • 1
    If you don't need your generated vectordrawable then http://developer.android.com/tools/support-library/index.html use `generatedDensities = []` ... if you are using generated vector drawable then use older version of support library ... [issue:201851](https://code.google.com/p/android/issues/detail?id=201851) – Selvin Feb 29 '16 at 17:04
  • i'm working on that, i'll tell you if i have success – Ninja Coding Feb 29 '16 at 17:16
  • 1
    I had used `support-v4` 23.2.0 but `appcompat-v7`, `design` 23.1.1 ... and it seems working(remeber to test it on some older device) ... I'm using too much genereted vectordrawable to use `generatedDensities = []` (like ` ` – Selvin Feb 29 '16 at 17:19
  • 1
    If you are using Support v23.2.0, you can check this answer http://stackoverflow.com/questions/35653131/back-arrow-and-overflow-icons-wrong-color-in-pre-lollipop-devices-after-updating/35654779#35654779 – guipivoto Feb 29 '16 at 17:38
  • those updates shouldn't affect projects in that way haha -.- thank you, it's working now (`ussing support-v4:23.2.0, appcompat-v7:23.1.1 and design:23.1.1`). Now i just have to hate those version warnings haha... – Ninja Coding Feb 29 '16 at 17:41
  • @GuilhermeP thank you, i tried both ways, both ways are working. thank you guys. – Ninja Coding Feb 29 '16 at 17:51

0 Answers0