O'Reilly logo

Pro Android 3 by Sayed Y. Hashimi, Dave MacLean, Satya Komatineni

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

Chapter 7. Working with Menus

The Android SDK offers extensive support for menus. In this chapter, you'll learn to work with several of the menu types that Android supports: regular menus, submenus, context menus, icon menus, secondary menus, and alternative menus. Android 3.0 introduced something called an action bar that integrates well with menu items. This action bar and menu interaction is covered in chapter 30.

In Android, menus, in addition to being Java objects, are also represented as resources. Because they are resources, the Android SDK allows you to load menus from XML files, like other resources. Android generates resource IDs for each of the loaded menuitems. We will cover these XML menu resources in detail in this chapter. We will ...

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