Hi,

1.Thanks for your prompt reply.Why I need to have all the three
activities in the stack because I  want to avoid the time it takes
to create the activity.So that user will not feel smoother screen
transition.to explain in a better way suppose that A and B activity
has a text view that updates the timer that is updated from a common
place.

Only objective is to have a smoother transition.

2.What is the use of "Single Top" activity.If I press back key on a
single top activity.Will it be killed?

Thanks,
Shekhar

On Apr 22, 10:30 pm, Mark Murphy <[email protected]> wrote:
> Shekhar wrote:
> > I have a problem.
>
> > I have to design an application in which three activities A ,B,C are
> > such that if I move across the activities, previous
> > activities are not killed.A,B,C should be in the application stack so
> > that their OnCreate
> > function is not called everytime.Activities should be killed only when
> > finish() is called explicitly.What is the solution for it?
>
> If the user goes from A -> B -> C, then presses the BACK button, C will
> be destroyed. If the user presses the BACK button again, B will be
> destroyed.
>
> If the user goes from A -> B, then takes a phone call and meanders away
> from your application for a while, A or B may be destroyed to free up
> RAM (though you will be able to use onSaveInstanceState() to retain some
> knowledge of your current condition).
>
> None of that is avoidable. All of that is very important for the proper
> operation of the users' phones.
>
> The only way to have the functionality of A, B, and C all exist as a
> unit is for it all to *be* a unit -- having a *single* activity do all
> three things.
>
> On the whole, I think Android works better where A, B, and C can work
> independently, and so I really recommend you consider why your design
> requires those activities to all be in memory at the same time.
>
> > Also what intent flag I should use to call another activity?
>
> I do not understand this question, sorry.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Training in US: 14-18 June 2010:http://bignerdranch.com
>
> --
> 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 
> athttp://groups.google.com/group/android-developers?hl=en

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