- customSearchView.addView(searchView);
-
- // Clear the searchHint icon so that it takes as little space as possible.
- ImageView searchHintIcon = (ImageView) searchView.findViewById(R.id.abs__search_mag_icon);
- searchHintIcon.setBackgroundResource(android.R.color.transparent);
- searchHintIcon.setLayoutParams(new LinearLayout.LayoutParams(1, 1));
- searchHintIcon.setAdjustViewBounds(true);
- searchHintIcon.setPadding(0, 0, 0, 0);
-
+ LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(0,
+ FrameLayout.LayoutParams.WRAP_CONTENT, 1);
+ customSearchView.addView(searchView, lp);
+