3 public boolean onCreateOptionsMenu(Menu menu) {
4 if (!mNavigationDrawerFragment.isDrawerOpen()) {
5 // Only show items in the action bar relevant to this screen
6 // if the drawer is not showing. Otherwise, let the drawer
7 // decide what to show in the action bar.
8 getMenuInflater().inflate(R.menu.${menuName}, menu);
12 return super.onCreateOptionsMenu(menu);
16 public boolean onOptionsItemSelected(MenuItem item) {
17 // Handle action bar item clicks here. The action bar will
18 // automatically handle clicks on the Home/Up button, so long
19 // as you specify a parent activity in AndroidManifest.xml.
20 int id = item.getItemId();
21 if (id == R.id.action_settings) {
24 return super.onOptionsItemSelected(item);