On Sat, Jan 31, 2009 at 8:12 PM, Raja Nagendra Kumar < [email protected]> wrote:
> In the contex of one each activity approach, we the following > advantages > - Go with just one activity for the enitre > application, hence no need to think of managing many activities life > cycle > - AndroidManifest would have only one configuration > - Switch the view by way of creating views as it > demands and use them > - if each view needs a context to create it self > properly, pass the paratmers to the constructor of the view, this > would also enhance compile checks and enable maintnace as opposed to > intent key value pair approach. You missed the disadvantages, the main one being that you are then responsible for keeping track of the full state of your application so that it can be recreated when the user returns to it after its process has been killing or changes the configuration it is running in by for example rotating the screen. This can actually become a significant amount of effort to do well, since you need to limit as much as possible the up-front work you need to do to get your UI re-created in whatever state it should be in. > Closure comparision to J2ME is Canvas which has lifecycle, however > many frameworks recommend one instance of canvas only.. I would strongly caution against trying to use models from J2ME to help understand Android. Pretty much no part of these aspects of the design were influenced by J2ME. -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support. 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 [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 -~----------~----~----~----~------~----~------~--~---

