Snippet

  The following snippet shows how to create a menu option list.

  1.  public boolean onCreateOptionsMenu(Menu menu) {
  2.     super.onCreateOptionsMenu(menu);
  3.     menu.add(0, SHARE_ID, 0, R.string.menu_share)
  4.         .setIcon(android.R.drawable.ic_menu_share);
  5.     menu.add(0, HISTORY_ID, 0, R.string.menu_history)
  6.         .setIcon(android.R.drawable.ic_menu_recent_history);
  7.     menu.add(0, SETTINGS_ID, 0, R.string.menu_settings)
  8.         .setIcon(android.R.drawable.ic_menu_preferences);
  9.     menu.add(0, HELP_ID, 0, R.string.menu_help)
  10.         .setIcon(android.R.drawable.ic_menu_help);
  11.     menu.add(0, ABOUT_ID, 0, R.string.menu_about)
  12.         .setIcon(android.R.drawable.ic_menu_info_details);
  13.     return true;
  14.   }

<!>