Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 7: working with menus

Chapter  7

working with menus

Android SDK has extensive support for menus. It supports regular menus, submenus, context menus, icon menus, secondary menus, and alternative menus. Android 3.0, in addition, introduced the action bar, which integrates well with menu items. The action bar and menu interaction are covered in Chapter 10. Now Android 4.0 has introduced pop-up menus: menus that can be invoked at any time based on a button click or any other UI event.

In Android, menus, much like other resources, can be represented as both Java objects and entries in XML files. Android generates resource IDs for each of the loaded menu items. This chapter covers the XML menu resources in detail as well.

Being resources, all menu items take advantage of auto-generated resource IDs.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint