I have this method but it does not work what do I do? :
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
super.onCreateOptionsMenu(menu);
getMenuInflater().inflate(R.menu.menu, menu);
MenuItem menuTeste = menu.add(0, 0, 0, "Item teste");
menuTeste.setIcon(R.drawable.adcsimbolo);
menuTeste.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
return true;
}
public boolean onMenuItemSelected (MenuItem menuItem){
//super.onMenuItemSelected(add,menuItem);
switch (menuItem.getItemId()){
case 0 :
Toast.makeText(CadastroActivity.this, "Tocado", Toast.LENGTH_SHORT).show();
break;
}
return true;
}
}