I'm also not sold on the new Activity for each new screen framework. Unless your new screen is very generic and can be reused by other applications (I think this is a very very small minority of all screens) you are better off using setContentView and/or ViewFlippers. I first went down the road of new activity for new screens as per Notepad example but very soon i had a spaghetti of activities - had to press Back button 10 times to leave my application. Surely that's not a preferred way to write anything. I scrapped new activity approach for ViewFlippers and setting contents and couldn't be happier.
On Oct 24, 1:58 pm, "Kipling Inscore" <[EMAIL PROTECTED]> wrote: > On 24 Okt., 19:54, "Robert K." <[EMAIL PROTECTED]> wrote: > > > Question: Why is it better to start a new activity if you want to > > change screen to a new view (for example to edit some notes on a > > separate text field)? > > I believe that starting a new activity will give you automatic view > hierarchy on the back button and setContentView() will not. > Also, if the screen you want to change to is at all generic, you can > use an implicit intent so that other programs which do the same thing > may be chosen if the user prefers. For the example you gave, editing a > note in a separate text field, ACTION_EDIT with a URI for the note > text would allow the user to drop in a new text editor application and > use it to edit notes from your application. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

