yes instead of making new activity to go back to the main activity u can use
a flag ....

here screen1 is suppose to be the old activity,,,,

/* Intent newIntent=new Intent("*android*.intent.action.SCREEN1");

newIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);

startActivity(newIntent); */



if i am wrong please make me correct



regards

kaushik
On Tue, Jan 27, 2009 at 9:24 AM, james <james_g20081...@yahoo.com> wrote:

>
> I have an application with contains multiple activities. The main
> activity will start the others ( use startActivity() ) depends on user
> event, when an activity close, it calls finish() and return back to
> main activity. It appears to behavior like that.
>
> However, the "problem" I see is main activity's onCreate function is
> called every time. I think the the main activity should be placed in
> the activity stack and simply push to front when others exit,
> therefore only onResume,  onStart are called. Is there some flag I
> need to set or I misunderstand the activity behaviro?
>
> In child activity, besides calling finish() or startActivity for main
> activity, what is other way to move main activity to front?
>
> Thanks,
> James,
>
> >
>

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