android - Switching Activities from menu: return to main activity starts it over -


short problem description: starting new activity @ menu seems lead multiple main activities (at least via 'back' navigation), , can not find "standard" way navigate activities.

details: writing small, simple , straight forward app 1 main activity , 2 "sub" activities, namely show , settings. both sub activities declared android:parentactivityname="mainactivity". in menu want let user switch between activities.

i have read android developer tutorial create menu, tutorial stops @ newgame() , showhelp() in onoptionsitemselected. other tutorials led following:

public boolean onoptionsitemselected(menuitem item) {     log.d(tag, "onoptionsitemselected! " + item.getitemid());     intent intent;     // handle item selection     switch (item.getitemid()) {      case r.id.settingitem:         intent = new intent(this, settingsactivity.class);         startactivity(intent);         return true; 

...

of course main activity should included in menu, want "up" , "back" working usual.

so question style androidish? main activity quite expensive in creating, since uses camera , camerapreview.

  1. destroy mainactivity finish() everytime 'settings' or 'show' called, , create again on 'back', 'up' , 'main activity' events?

  2. write 3 different menus or onoptionsitemselected main activity (which nothing when 'main activity' chosen) , each sub activity?

  3. save intent main activity , try reuse this?

if there tutorial out there (for api level >= 11) defining simple switching between apps, read it. i'm quite lost in have found now.