A search widget is just an extensible action item. You can create your own very easily using EditText as an advanced layout. You can see this in the โFolding Action Itemโ example from Feature Demos (although this is just a very simple example).
You can also use the built-in widget on Honeycomb and from the compatibility library:
Context context = getSupportActionBar().getThemedContext(); View searchView = SearchViewCompat.newSearchView(context); if (searchView != null) { //Use native implementation } else { //Use simple compatibility implementation }
Support for 99% compatible implementation also on the roadmap .
Jake wharton
source share