Harsha M V Harsha M V - 6 months ago 50
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

Answer

In your theme:

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

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