I have a searchView which looks like this:
private void setupSearchView() {
mSearchView = (SearchView) getActivity().findViewById(
R.id.search_vi
This will do exactly what you're trying to achieve.
setIconified(false)
will keep the cross icon at this end of the SearchView so that the user can still cancel the same way as if the magnifying glass was clicked.
searchView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
searchView.setIconified(false);
}
});