Skip to content

Instantly share code, notes, and snippets.

@jezinka
Created March 19, 2017 17:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jezinka/18aa9b2c84ef51e3e52ef6ed1e706842 to your computer and use it in GitHub Desktop.
Save jezinka/18aa9b2c84ef51e3e52ef6ed1e706842 to your computer and use it in GitHub Desktop.
@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