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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access