There is this widget for the ActionBar which called \'SearchView\'. When it\'s not in use, it looks like this:
To open up a searchView keeping the close_button in the end use this in onCreate:-
searchView
close_button
onCreate
searchView.findViewById(R.id.search_button).performClick();