Android menu - on a click each activiy stay behing -
I have a menu on my application The problem is that, when I click on an item, the previous one is behind lives. So when I click on the last button on my phone, the previous activity is seen. I do not know what's going wrong in my code.
Then this is my code for the menu:
@Override Public Boolean Permit menu (menu menu) {getMenuInflater () .inflet (R. menu menu, menu ); Back true; } @ Override Public Boolean On Option Itam Select (Menu Item) {Switch (ITAT. ITMID)} {Case RID. Action_User: Intent Intent 1 = New Intent (TeamActivity.es, UserActivities.class); StartActivity (intent1); Back true; Case R.id.action_team: Back Truth; Case R.id.action_score: Intent intent2 = New Intent (TeamActivity.This, ScoreActivity.class); startActivity (intent2); Back true; Case R.id.action_settings: intent3 = new intent (TeamActivity.This, SettingsActivity.class); startActivity (intent3); Back true; Case R.id.action_about: intent4 = new intent (team activity. This, aboutActivity.class); startActivity (intent4); Back true; Default: Return Super.Options item selected (item); }} I hope you understand, and sorry for my bad english
Just add it. Finnish (); After each start activity () before it comes true!
Comments
Post a Comment