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 <[email protected]> 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 [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
-~----------~----~----~----~------~----~------~--~---