Chapter 2: Menus, Lists, and Notifications
In This Chapter
Building options menus and context menus
Using lists in activities as well as stand-alone activities
Adding notifications to the status bar
Sure, I wish I were down at my favorite cheap restaurant, ordering something that a gourmet would never eat. Alas, I am not. As much as I would prefer to talk about menus dealing with food, I’m actually going to talk about menus inside an Android application!
All about Menus
Android provides a simple mechanism for you to add menus to your applications. With Android’s help, you can add the following types of menus:
• Options menu: An options menu is the menu that appears when a user presses the Menu key on a pre-Honeycomb device. (See Figure 2-1.) On a device running Android 3.0 or greater, an options menu appears when a user presses a little menu icon. (Figure 2-2 illustrates this with my development computer’s emulator. Instead of a finger touching the icon, you see my mouse cursor.)
In addition, Honeycomb has an action bar. The action bar appears in the upper-right corner of the screen. (See Figure 2-3.)
• Context menu: A context menu is floating list of menu items that is presented ...