Skip to content
pads edited this page May 27, 2011 · 2 revisions

Background

  • Android apps can have 2 different types of menu:
    • Options menu (appears at the bottom of the screen when you press the menu button - ie. application global menus)
    • Context menu (appears when you tap-and-hold on a UI element - ie. menus relevant to the context of the item selected)
  • All menus defined in XML
  • Override onCreateContextMenu/onContextItemSelected or onCreateOptionsMenu/onOptionsItemSelected
  • Use the ID (specified in the XML menu definition) to identify which menu item was selected

Example Code

Checkout the Menus folder.

Further Reading

Clone this wiki locally