I am using ActionbarSherlock 4.0 to create my actionbar. I have three icons
in the actionbar - home, preferences, and help, and a dashboard screen to
start the app with 6 different activities to choose from. In all 6
activities, the home button just goes to the Dashboard activity.

* In the Help Activity, the actionbar only shows the preferences and home
icon. The home icon has the "up" indicator. In the onOptionsItemSelected
method in the HelpActivity uses finish() for the case of selecting the home
button. It all works as described.

* In the PreferencesActivity the actionbar only shows the help  and home
icon. The home icon has the "up" indicator. In the onOptionsItemSelected
method in the PreferencesActivity uses finish() for the case of selecting
the home button. It all works as described.

If I click on Help, then Preferences, then Help, then Preferences, then
Help, and then go back, I have to go back through the whole chain to get to
my starting point. I seem to be creating several HelpActivities and
PreferenceActivities as I go (I put a toast message in each activities
onCreate method to tell me when the activity is created). This behavior
does not seem to be a good idea. So, my question is: in the
onOptionsItemSelected method for the HelpActivity, how do I determine if
there is an existing PreferenceActivity and go to that one, or create a new
one if there isn't one. I would think there must be some Android pattern
for this problem, as I can't be that clever to be the first one to run into
this problem.

Thanks!

Mark

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to