I've made a few adjustments to my tiny app, so that it would follow the material design guidelines better.
I have a search action item, and the action bar is blue, but when clicking the search action item, I can barely see the caret (where the text is being entered).
I would like to change it, maybe to white (like the text color).
What I've tried
I've tried looking at the code of the support library, searching for a function that will allow me to customize the caret's color, but I couldn't find a working solution.
I've tried to use "searchViewStyle" as one of the theme's items, and create a new style:
<style name="AppTheme.SearchViewStyle" parent="Widget.AppCompat.SearchView"> ...
But none of what I've found seem fit for this.
The weird thing is that when using "Theme.AppCompat.Light" instead of "Theme.AppCompat.Light.DarkActionBar" , the caret's color has changed (to green).
How do I change the color of the text caret of the search action item (AKA SearchView) ?
EDIT: I've found out that it's possible to set "colorControlActivated" for the toolbar, as such:
<style name="AppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar"> <item name="actionBarTheme">@style/AppTheme.ActionBarTheme</item> .... <style name="AppTheme.ActionBarTheme" parent="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> <item name="colorControlActivated">#FFffffff</item> </style>
Seems to work, but does it affect other things, except for the caret of the search item? If so, which ones? and is it possible to affect only the caret ?