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

Understanding Android Menus

The key class in Android menu support is android.view.Menu. Every activity in Android is associated with one menu object of this type. The menu object then contains a number of menu items and submenus.

Menu items are represented by android.view.MenuItem. Submenus are represented by android.view.SubMenu. These relationships are graphically represented in Figure 7–1. Strictly speaking, this is not a class diagram but a structural diagram designed to help you visualize the relationships between various menu-related classes and functions.

Image

Figure 7–1. Structure of Android menu-related classes

Figure 7–1 illustrates that ...

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