我正在使用 actionbarsherlock。使用以下代码,我为主屏幕创建了一个菜单
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getSupportMenuInflater();
inflater.inflate(R.layout.menu, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.about:
Intent i = new Intent(this, AboutApp.class); // Start About.java Activity
startActivity(i);
return true;
case R.id.feedback:
Intent j = new Intent(this, SendFeedback.class);
startActivity(j);
return true;
default:
return super.onOptionsItemSelected(item);
}
}
如何将此菜单扩展到整个应用程序的所有屏幕?