Harsha M V Harsha M V - 5 months ago 32
Android Question

Android SearchView Icon

I want to disable the Mag icon displayed inside the search view component. Any idea how to reference it and remove it or replace it with another drawable ?

enter image description here


In your theme:

<style name="Theme" parent="Your parent theme">
<item name="android:searchViewSearchIcon">@android:drawable/ic_search</item>

searchViewSearchIcon is a private attribute. This answer therefore does not work (on the native ActionBar).