contact: 
Uki D. Lucas

Recent site activity

106b. onCreateOptionsMenu

  • create Menu options, you can add as many menu items as you wish, here we have only two
  • if statements are considering inside which calling class you are
  • logically only one of these Menu items will ever show




public boolean onCreateOptionsMenu(Menu menu)

{

if (!ContactInfo.class.getSimpleName().equals(activityName))

menu.add(0, MENU_1_CONTACT_INFO, 0, MENU_LABEL_CONTACT_INFO);

if (!AboutUs.class.getSimpleName().equals(activityName))

menu.add(0, MENU_2_ABOUT_US, 0, MENU_LABEL_ABOUT_US);


return true;

}