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

Controlling Your Menus

Because screen real estate is at a premium with a mobile application, Android exposes a mechanism to provide application functionality without sacrificing too much screen real estate. Android allows each Activity to display its own menu when the device's menu button is selected. In addition, Android supports a context menu system that can be assigned to any View. Context menus are triggered when the user holds the touch screen for 3 seconds or longer within a View, presses the trackball, or presses the middle D-pad button; this depends on the device's input mechanism. Activity and context menus support additional submenus and context menus on the UI controls.

Introducing the Menu System

Given the small screen and the need to navigate applications that may have a large number of onscreen options, Android provides a multistage menu system. This menu system is optimized for small screens and the input they allow. These menu stages are as follows:


  

You are currently reading a PREVIEW of this book.

                                                                                        

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

  

Start a Free Trial