int magId = getResources().getIdentifier("android:id/search_mag_icon", null, null);
ImageView magImage = (ImageView) mSearchView.findViewById(magId);
magImage.setLayoutParams(new LinearLayout.LayoutParams(0, 0));
magImage.setVisibility(View.GONE);
I'm using this above code, but it is not removing the search
icon. I've set
mSearchView.setIconified(false);
Not understading that why it is still showing the icon.