public boolean onCreateOptionsMenu(Menu menu) { boolean result = super.onCreateOptionsMenu(menu); menu.add(0, 1, 0, R.string.create_restaurant); menu.add(0, 2, 0, R.string.create_customer); menu.add(0, 3, 0, R.string.create_menu); return result; }
public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == 1) { createRestaurantList(); return true; } if (item.getItemId() == 2) { createCustomerList(); return true; } if (item.getItemId() == 3) { createMenuList(); return true; } return super.onOptionsItemSelected(item); } try this u can get ur result -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en