Search code examples
androidsearchviewactionviewandroid-actionbar-compat

How to change searchView's style of actionBarCompat?


How can i Change the style of textView inside the search's actionView ??

I managed to change the icons and background of it , but I want to change cursor's color and "Texthighlight" of listview.

I used android:textCursorDrawable=@null in my app's theme ( and another styles that changes actionview's style), but it seems any changes to the theme doesn't effect on ActionBarcompat's Searchview.

I use open source support library ( imported the library to eclipse then added it to my app).

Thanks ...


Solution

  • See: Changing the cursor color in SearchView without ActionBarSherlock

    Summary: You have to use Java reflection to access mCursorDrawableRes in TextView and set it to 0.