0

I want to remove the search icon in the hint-field of the searchView (see image attached).

enter image description here

I've tried multiple solutions, in particular this:

int magId = getResources().getIdentifier("android:id/search_mag_icon", null, null);
ImageView magImage = (ImageView) searchView.findViewById(magId);
magImage.setLayoutParams(new LinearLayout.LayoutParams(0, 0));

Taken from this: Remove the SearchIcon as hint in the searchView but without any success. Ideas? :)

Community
  • 1
  • 1
Filnik
  • 1,023
  • 3
  • 13
  • 26
  • Instead of changing the layout params on the image view, have you tried setting a new drawable on the imageview - maybe with a color drawable with the same background color of the actionbar or just a transparent color? – Submersed Mar 11 '14 at 14:28
  • yes, I've tried both setting the visibility to gone and changing the image's source.. but without any result :( – Filnik Mar 11 '14 at 14:33

0 Answers0