How can I change the action bar search view hint text colour?
This question explains how to get the EditText when using ABS: Android ActionBar Customize Search View
Is there a android.R.id I could use to get a reference to the EditText so I could change the hint colour? Or is there some other way to change the colour?
Also you can set the SearchView on your menuItem manually and thereby have full control over the view.
Just get the
textView
id of search widget and usesetTextColor()
method to change the search text color andsetHintTextColor()
to change the search hints text color.Look to this class, it can help you to solve your problem
This is really simple to achieve using the
styles.xml
Just understand that themeing the SearchView is directly related to the theme of the Toolbar from whosemenu.xml
it is fetched as aapp:actionViewClass
.I resolved it adding this property to the main theme:
And then add the property i want to change in this case the hint color.
Hope it helps :D