Published in


How to change Menu SearchView Widget Icon Color In Android

Style is Important...

Image Credits:

SearchView Widget in Android is used to search a query and submit a request to a search provider, Which shows the suggestions list on the basis of the search query.

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.




The (retired) Pub(lication) for Android & Tech, focused on Development

Recommended from Medium

Implementing Dark theme in your Android Application

Glassmorphism in Jetpack Compose

IP Webcam

Cartoon Network

Retrieve Data From Android Devices Without Rooting

Open Source at Microsoft Mobile

Android Page Demo Part 2: Setting Drawer

How to Implement a Flutter QR Code Scanner Plugin from Scratch

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Danish Amjad

Danish Amjad

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

More from Medium

How to build in-app chat using Kotlin — Part 1

Make your android smartphone to vibrate

Simple custom shadow on Android

Server Driven Banner for Apps