Chapter     4

Android UI Options Menus: OptionsMenu Class and the Action Bar

Now that we have covered the ViewGroup (UI layouts) and View (UI widgets) classes in Android OS, in this chapter we learn more about the Android Menu class. The Menu class allows us to create different types of menu structures in Androidfrom OptionsMenus to ActionBar menus to ContextMenus to PopUpMenus.

We focus on Android OptionsMenu class in this chapter, as they are the most important type of menu in Android, and then later on we will work with more localized PopupMenu and ContextMenu classes in the next chapter.

Implementing menus in Android is not all that different from implementing UI widgets and layout designs. The menu design work is done using XML, in the ...

Get Pro Android UI now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.