I have a "base" group of activities.  Let's call them A1, A2, and A3.
When the user switches between these activities, they are at the
"bottom" of the app.  When they press the BACK button in either A1,
A2 , or A3, they leave the app (or task).

An easy way to visualize this is a tab activity, such as the phone
app.  When you switch tabs in the phone app, the individual activities
are not finished.  This is important because if you scroll down in
your call log, and then change tabs to your contacts, and then return
to the call log, the activity is still in the same state, with the
list being scrolled down.

I am trying to find a way to mimic this behavior, but without the use
of a TabActivity.  The problem I've run into is that when you use the
various task and intent flags such as FLAG_ACTIVITY_SINGLE_TOP,
FLAG_ACTIVITY_NEW_TASK, and/or FLAG_ACTIVITY_CLEAR_TOP, is that you
can mimic the navigational functionality, but the other tasks are
finished() and destroyed when you switch.  This is not optimal; when
switching back and forth between the tabs/activities, there is no good
reason to destroy and re-create the activities.  (In the above
example, the call log wouldn't be scrolled down to the same spot
because it was destroyed and recreated)

I would love to find a simple flag such as FLAG_CLEAR_TASK_STACK.
That's all I need, although it doesn't exist from what I can tell. I
wonder if the only way to accomplish this is to do what TabActivities
do themselves and create my own ActivityGroup?  I'm sure that would
solve the problem, but it seems to be overkill to just solve this
problem.

Thanks!

-- 
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