Menu Dialog Options

public boolean onMenuItemSelected(int featureld, Menultem item) {

super.onMenuItemSelected(featureId, item);

showCredits(); else if (item.getItemId() == 2) showRegistration();

showWebView ();

return true;

@Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu);

Menultem mItem = menu.add(0, 1, Menu.NONE, "About"); Menultem mItem2 = menu.add(0, 2, Menu.NONE, "Settings"); Menultem mItem3 = menu.add(0, 3, Menu.NONE, "Reports");

mItem.setIcon(R.drawable.ic_menu_about);

mItem2.setIcon(R.drawable.ic_menu_register);

mItem3.setIcon(R.drawable.ic_menu_reports);

return true;

Was this article helpful?

0 0

Post a comment