Reputation: 2072
My toolbar icons are all black, except the SearchView
and overflow (three dots) icon, which are what appear to be a dark grey color.
Is there a way to set the tint of these icons to black to match my other icons?
Here's the theme I use, but as far as I know it's nothing out of the ordinary.
<!-- Base application theme. -->
<style name="Theme.AnglersLog" parent="Base.Theme.AnglersLog">
</style>
<style name="Base.Theme.AnglersLog" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:logo">@android:color/transparent</item>
<item name="colorPrimary">@color/anglers_log_light</item>
<item name="colorPrimaryDark">@color/anglers_log_dark</item>
<item name="colorAccent">@color/anglers_log_accent</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
</style>
And toolbar
<android.support.design.widget.AppBarLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:background="@color/anglers_log_light"/>
</android.support.design.widget.AppBarLayout>
Thanks!
Upvotes: 2
Views: 376
Reputation: 12571
You need to add the theme to the AppBarLayout
and the Toolbar
like this:
<android.support.design.widget.AppBarLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.ActionBar" >
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:background="@color/colorAccent"
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
</android.support.design.widget.AppBarLayout>
Or if you want a dark theme:
<android.support.design.widget.AppBarLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/@style/ThemeOverlay.AppCompat.Dark.ActionBar" >
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:background="@color/colorAccent"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat" />
</android.support.design.widget.AppBarLayout>
Upvotes: 3