"non-multiple" means everything except the standard launch mode (which
before 1.0 was in fact called multiple, which is where this text comes
from).

And "current activity" means the current activity instance associated with
the slot you are launching a new intent in to.

Also if you start the activity in a slot with the same intent as you last
used to start it (filterEquals is true), then it should just resume that
activity regardless of the launch mode or flags.  Well except if you set the
CLEAR_TOP flag, which ensures that the activity is restarted.

On Thu, Dec 3, 2009 at 12:21 PM, jotobjects <jotobje...@gmail.com> wrote:

> This is a followup question.  The docs for
> LocalActivityManager.startActivity() say -
>
> "If the current activity uses a non-multiple launch mode (such as
> singleTop), or the Intent has the FLAG_ACTIVITY_SINGLE_TOP flag set,
> then the current activity will remain running and its
> Activity.onNewIntent() method called. "
>
> Two confusions here: (1) singleTop is a multiple (not a non-multiple)
> launch mode as I understand it.  I assume this should read
> "singleTask" instead of "singleTop".  (2) "current activity"
> apparently means "previous activity with the same id" which might not
> be the currently running activity returned by the getCurrentActivity()
> method.
>
> I think what the passage means is that if you set singleTop launch
> mode then it will resume the previous activity rather than recreating
> it whether or not it is the currently running (top) acrtivity.
> Otherwise there would not be a way to resume the previous Activity
> unless it was a non-multiple launch mode.  Is that right?
>
>
>
> On Nov 23, 11:06 am, chentschel <chentsc...@gmail.com> wrote:
> > Thanks Dianne. Did you mean that usage ofActivityGroupand childs
> > activities are somehow discouraged.?
> >
> > I had a sort of tabs before (implemented by buttons in layout), but
> > code was ugly and full of switch/case to handle changes to different
> > views/adapters, etc. so I changed toActivityGroupimplementation. It
> > seemed more coherent to the android activities/adapters coding model.
> >
> > CH
> >
> > On Nov 23, 2:33 pm, Dianne Hackborn <hack...@android.com> wrote:
> >
> > > It is trying to mimic the the behavior of normal activities -- if you
> start
> > > an activity, this will start on top (or here replace) the current one,
> > > unless its launch mode is singleTop.  It seems there is a bug where it
> is
> > > ignoring the single top flag.  This should be fixed, but note that
> activity
> > > groups and child activities are a little odd in that the code driving
> them
> > > is completely different than top-level activities, so there can be many
> > > subtle differences in behavior between the two.
> >
> > > On Mon, Nov 23, 2009 at 7:45 AM, chentschel <chentsc...@gmail.com>
> wrote:
> > > > Update on this: Setting 'android:launchMode="singleTop"' at the sub-
> > > > activity definition on the manifest file. Solves my problem.
> >
> > > > Can someone shed a light on this?.
> >
> > > > Thanks.
> > > > CH
> >
> > > > On Nov 23, 11:59 am, chentschel <chentsc...@gmail.com> wrote:
> > > > > Hi!,
> > > > >    I'm extendingActivityGroupclass and implemented a custom tabHost
> > > > > and widgets for my app. Can someone shed a light on how are the
> > > > > Activities fife-time inside anActivityGroup?.
> >
> > > > > Im getting a weird behavior when using the following code to send a
> > > > > new intent to the current sub-activity, then change tab, and
> getting
> > > > > back to original tab. (TAB1 -> TAB2 -> TAB1)
> >
> > > > > LocalActivityManager lm = getLocalActivityManager();
> >
> > > > > Intent i = new Intent(this, lm.getCurrentActivity().getClass());
> > > > > i.setAction(WeegohApp.INTENT_ACTION_FILTER_SHC);
> > > > > i.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
> >
> > > > > lm.startActivity(tabHost.getCurrentTabTag(), i);
> >
> > > > > What i see from debug..
> >
> > > > > onSaveInstanceState() is called on TAB1, then TAB2 is current
> > > > > subActivity, but when going back to TAB1 onCreate() is called.
> >
> > > > > onCreate() is not called with the same test without using the
> > > > > onNewIntent() described above.
> >
> > > > > Thanks in advance !
> > > > > CH
> >
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> <android-developers%2bunsubscr...@googlegroups.com<android-developers%252bunsubscr...@googlegroups.com>
> >
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
> >
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > hack...@android.com
> >
> > > Note: please don't send private questions to me, as I don't have time
> to
> > > provide private support, and so won't reply to such e-mails.  All such
> > > questions should be posted on public forums, where I and others can see
> and
> > > answer them.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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

Reply via email to