I forked a GitHub project from https://github.com/nglauber/playground/tree/master/android/DemoSearch
I would like to set the color of the search icon to be pure white. At the moment, the search icon is gray in color, and is obviously different from the white text of "Demo Search".
Edit:
Based on some suggestions, I created a new icon using pure white (to be exact, RGB=255,255,255), and use it in place of the android:ic_menu_search. Android will tint it with a gray tone (verified with color picker tool on the screenshot), even though the original icon is in pure white.
This suggests to me that Android is tinting the icon on purpose. And I hope there is some way I can have the control to set or change the icon color in the Android Toolbar.
Drawable Icon Resource
inFile/New/Vector Asset/Icon
. Click on Icon and select the required one and use it to theToolBar
. You can customize the color of Icon too. – Carvelbuiltandroid:fillColor="your custom color"
. – Carvelbuilt