I think I understood what the answer is.
To expand the default search if I use
mSearchView.setIconifiedByDefault(false);
it will display a search bar, for example, the first image
If I use mSearchView.onActionViewExpanded();, then it is displayed as a second image.
source
share