How to change Menu SearchView Widget Icon Color In Android

Image Credits:

Visit my website at

Recently I have been working in an android application in which SearchView Widget used in the menu.xml file. You can see the code from the below gist.

The menu file is used in the toolbar & I noticed that the menu searchView icon is showing the right color in below Oreo and showing the wrong icon color in android Oreo.


This will occurs when you don’t define the theme in your toolbar, After a lot of research, I noticed that the theme of the toolbar is not defined.

How to solve this:

To solve this issue you just need to add a toolbar style in your style.xml file like below:

Now define your style in your toolbar app: theme like below:

That’s it now you will be able to see the SearchView widget icon color as you defined in your style.xml file.

If you want to learn some other topic then check the below link:

Sharing the Knowledge is Caring :-)

Thanks for reading this article. Be sure to clap to recommend this article if you found it helpful. It means a lot to me.

If you need any help then Join me on Twitter, Linkedin, Github, and Subscribe to my Youtube Channel.

Senior Software Engineer(Android). Open Source Contributor, Technical Writer, Email: check my website at