Using SearchView on Post-Android 3.0
Now you have a search interface that works everywhere. However, it does not work in a Honeycomb-approved fashion.
Honeycomb added a new class called SearchView. SearchView is an action view – a view that may be included within the action bar. SearchView allows your entire search interface to take place within your activity’s action bar, instead of inside a dialog superimposed on your activity. That means that it has the same styling and theming as your application, which is a good and fine thing.
Using an action view is as simple as adding an
android:actionViewClass attribute to your menu item tag, like so:
Listing 28.14 Add an action view to your menu (
<menu xmlns:android="http://schemas.android.com/apk/res/android"> ...