Remember that your activity class has methods that are automatically called when it is dropped and restored. All you need to do is implement them.
On the original question of being able to pass page 1 data to page 2... just add a click listener to your 'next' button, in there create the intent to display p2, and add the values you want to pass as intent extras. Page 2 can then pull the values out of the intent at its leisure. Doug On Jun 15, 7:48 am, doubleminus <[email protected]> wrote: > Ah. So I'll likely be using a listener of some sort or a app > Preference object - and not writing to the database? Good to know. I > hadn't thought of the obvious issues you've brought up (user moving > away from application then coming back). The data does not need to be > preserved beyond the generation of the text file...but definitely does > need to persist until that file is created. > > On Jun 15, 7:14 am, gjs <[email protected]> wrote: > > > > > Hi there, > > > You may need to save your data from the spinners earlier using the > > various Listeners in order to cater for other events - eg press Home/ > > Back button, keyboard open/cose, phone rings etc - other than just > > when user 'clicks button to move to next page'. > > > You can also save the data from spinners etc into application > > Preference objects, these can also be used to persist (read & write) > > data across app invocations. > > > Regards > > > On Jun 14, 4:03 pm, doubleminus <[email protected]> wrote: > > > > This is a general architectural question. > > > > I want to offer a user a simple two page form. The first page will > > > have a few Spinners for the user to select options from. The second > > > page will have a series of EditTexts for the user to fill in. After > > > the second page, the user clicks a button to generate a text file > > > based on the values they have input. > > > > My question is: What is the best way to handle preserving the data > > > from the spinners on the first page of the form, in order to place > > > them into the text file? > > > > I feel like the "architecture" should be something like this: > > > 1. User selects Spinner values on first page and clicks button to move > > > to next page of form.. > > > 2. Spinner values are placed in database > > > 3. User fills in EditTexts on second page. Clicks button to generate > > > text file. > > > 4. Database is queried for Spinner values, which are added to newly > > > created text file, then EditText values are added > > > > Does this strategy make sense? Does anyone have advice on a better way > > > of handling the gathering of two pages of form input then using it to > > > create a text file? > > > > The user would need to be able to flip back and forth between the form > > > pages as needed. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

