| 1 |
|
| 2 |
@Override |
| 3 |
public boolean onCreateOptionsMenu(Menu menu) { |
| 4 |
// Inflate the menu; this adds items to the action bar if it is present. |
| 5 |
getMenuInflater().inflate(R.menu.${menuName}, menu); |
| 6 |
return true; |
| 7 |
} |
| 8 |
|
| 9 |
@Override |
| 10 |
public boolean onOptionsItemSelected(MenuItem item) { |
| 11 |
// Handle action bar item clicks here. The action bar will |
| 12 |
// automatically handle clicks on the Home/Up button, so long |
| 13 |
// as you specify a parent activity in AndroidManifest.xml. |
| 14 |
int id = item.getItemId(); |
| 15 |
if (id == R.id.action_settings) { |
| 16 |
return true; |
| 17 |
} |
| 18 |
return super.onOptionsItemSelected(item); |
| 19 |
} |