Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main_menu, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.meal_list_item:
Intent intent = new Intent(this, MealListActivity.class);
startActivity(intent);
return true;
default:
return super.onOptionsItemSelected(item);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment