O'Reilly logo

Pro Android 4 by Satya Komatineni, Dave MacLean

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Action Bar and Search View

In Android 4.0, because the action bar is available on phones, there is an increasing interest in using it as a search facility. This section shows how to use a search widget in the action bar.

We will provide code snippets that you can use to modify the project you have seen so far to include a search widget. Although we present only snippets, you can see the full code in the downloadable project for this chapter.

A search view widget is a search box that fits between your tabs and the menu icons in the action bar, as shown in Figure 10–7.

Image

Figure 10–7. An action bar search view

You need to do the following to use ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required