O'Reilly logo

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

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 5. Working with Menus and Dialogs

In Chapter 3, we introduced you to resources, content providers, and intents—the foundations of the Android SDK. Then we covered UI controls and layouts in Chapter 4. In this chapter, we'll show you how to work with Android menus and dialogs.

The Android SDK offers extensive support for menus and dialogs. 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.

In Android, menus are represented as resources. As resources, the Android SDK allows you to load menus from XML files, like other resources. Android generates resource IDs for each of the loaded menu items. We will cover these ...

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