Thanks for ur replay.
I got one way to solve my problem and it resembels your solution.What i did is i made my EditText as static.Whenever oncreate() is called i check EditText for previous version of instance,if at all previous EditText was there i am getting it's data using EditText's standard way EditText.getText().toString().It is working up to the mark in all three situations ,when orientation is changed, "Home" button pressed and "BACK" button is pressed. But the thing i think , i am not using properly is onSaveInstanceData (),onRestoreInstanceData().Because those methods are standard ones.Moreover there should be some reason why they are there. My question is , Am i doing correct?? Is there any standard way to retain EditText data when "BACK" button is pressed.Why onSaveInstanceData() call back is not called when "BACK" pressed.I have seen "google" home web page on android has on "EditText" to accept data and it is retaining data in all the three senarios. Any help would be appreciated. Regards, -Siva. On Sep 1, 11:56 pm, Dianne Hackborn <[email protected]> wrote: > I would suggest instead saving the data in onPause() and restoring it in > onCreate(). (And if you are doing this, you should turn off the text view's > auto-saving of its data in the saved instance state, since you no longer > need that.) > > On Tue, Sep 1, 2009 at 11:44 AM, Mark Murphy <[email protected]>wrote: > > > > > > > > > pink 444 wrote: > > > Hai, > > > I have a EditText filed in my Activity class,Where i need to > > > retain data,when orientation is changed or "HOME" button is pressed or > > > "BACK(FINISH)" is pressed. > > > > Android internally maintaining EditText when orientation is > > > changed or HOME button is pressed .But it is not maintaining EditText > > > status when BACK button is pressed. > > > > How can i make it happen to retain data in all three cases > > > (orientation is changed,HOME is pressed, Back is pressed) in a > > > feasible way? > > > > Any help would be appreciated highly. > > > Step #1: Implement onKeyDown() in your activity > > > Step #2: Watch for KeyEvent.KEYCODE_BACK > > > Step #3: When you get that event, save your data someplace, and still > > pass the key event to the superclass for processing > > > Step #4: In onCreate(), if you are not passed a Bundle, look for the > > data wherever you stored in from Step #3 > > > -- > > Mark Murphy (a Commons Guy) > >http://commonsware.com|http://twitter.com/commonsguy > > > _Android Programming Tutorials_ Version 1.0 In Print! > > -- > 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, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them.- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

