Chapter     5

Android UI Local Menus: The ContextMenu Class and PopupMenu Class

In this fifth chapter, we will take a look at the other two major types of menu systems in Android: the context menu and the pop-up menu, in the form of the ContextMenu Java interface, and the PopupMenu class.

I’m calling these two menu structure types “local” menus in this chapter’s title because these menus are local to a UI element or View widget itself, and are in fact directly invoked by clicking (PopupMenu), or long-clicking (ContextMenu), on the UI element widget View object that the menu affects.

In fact one of these local menuing types, the PopupMenu class, is actually implemented in Android as a UI widget, as you will learn a little bit later on in this ...

Get Pro Android UI now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.