public boolean onCreateOptionsMenu(Menu menu) {
menu.add(0,0,0,"帮助");
menu.add(0,1,1,"退出");
return super.onCreateOptionsMenu(menu);
}//创建菜单
public boolean onOptionsItemSelected(MenuItem item) {
if(item.getItemId()==0) {
Toast.makeText(this,"帮助信息",Toast.LENGTH_LONG).show();
}
if(item.getItemId()==1) {
this.finish();
}
return true;
}//响应Menu选择事件