How to change the Search View Background color and the icons ?
Asked
Active
Viewed 596 times
0
-
possible duplicate of [Styling a SearchView in Android Action Bar](http://stackoverflow.com/questions/11527636/styling-a-searchview-in-android-action-bar) – Bryan Herbst Mar 21 '14 at 15:23
-
I tried but the solution not working – Chathura Wijesinghe Mar 21 '14 at 15:28
-
Then post the code that you have tried, describe what you observe, and explain why what you observe isn't what you expect. – Bryan Herbst Mar 21 '14 at 15:44
-
Yes. [This answer](http://stackoverflow.com/a/16971484/1253844) may also be helpful. – Bryan Herbst Mar 21 '14 at 15:59
1 Answers
0
i did the same adding in styles.xml
:
<style name="MyTheme" parent="Theme.Sherlock">
<item name="searchViewCloseIcon">@drawable/my_close_icon</item>
<item name="searchViewSearchIcon">@drawable/my_search_icon</item>
<item name="searchAutoCompleteTextView">@style/searchTextView</item>
</style>
<style name="searchTextView" parent="Widget.Sherlock.SearchAutoCompleteTextView">
<item name="android:textColor">@android:color/black</item>
<item name="android:textColorHint">@android:color/red</item>
</style>
More info: couldn't change actionbarsherlock SearchView icon
Update:
Text color of SearchView in ActionBar with ActionBarSherlock