我正在做菜单项。但我无法在屏幕上查看菜单项。查看菜单项需要做什么。我的代码:
public boolean onCreateOptionMenu(Menu menu){
super.onCreateOptionsMenu(menu);
int group1 = 1;
int group2 = 2;
MenuItem info = menu.add(group1,1,1,"About");
info.setIcon(R.drawable.ic_launcher);
MenuItem set = menu.add(group2,2,2,"App Setting");
set.setIcon(R.drawable.images);
return true;
}
private boolean MenuChoice(MenuItem item){
switch(item.getItemId()){
case 1:
Toast.makeText(this, "You clicked on item 1", Toast.LENGTH_LONG).show();
return true;
}
return false;
}