Reputation: 17072
I'm new to android and I'm trying to figure out if there is a best practice in menu handling.
Well, here is the thing:
I have created a menu.xml
file (within res/menu
), Main.java
handle the menu action with a switch case
.
I'm wondering what is the best way to run appropriate task when an action is performed on a menu item:
Upvotes: 2
Views: 2459
Reputation: 75615
...
startActivity(new Intent(getApplicationContext(),MyOtherActivity.class));
return;
it doesn't have to be more complicated than that.
Upvotes: 3