In my app, I'm using a SearchView in the actionbar that it's always expanded like this:
My main.xml is this:
<item
android:id="@+id/menu_search"
android:actionViewClass="android.widget.SearchView"
android:showAsAction="always"
android:title="Search" />
MainActivity.java:
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, menu);
MenuItem searchViewItem = menu.findItem(R.id.menu_search);
SearchView searchView = (SearchView) searchViewItem.getActionView();
searchView.setIconifiedByDefault(false);
return true;
}
I would like to remove the search icon and expand the editText.
Regards