Harsha M V Harsha M V - 2 years ago 241
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 Source

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).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download