In onOptionsItemSelected... I saw some code that are different in the switch block.
Case 1 (Normally seen)
public boolean onOptionsItemSelected (MenueItem item)
switch (item.getItemId()){
case R.id.item1:
startActivity (new Intent (this, PrefsActivity.class));
break;
}
return true
Case 2 (unsure of why it's set up this way)
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case MENU_NEW_GAME:
newGame();
return true;
}
return false;
My Question
What are the differences between Case 1 and Case 2?