Your views do need to have an android:id assigned to them to be able to save/restore their state automatically (otherwise they wouldn't be able to correlate the data between the old and new view hierarchies).
On Wed, Jun 22, 2011 at 1:30 PM, TreKing <treking...@gmail.com> wrote: > On Wed, Jun 22, 2011 at 3:16 PM, EmbSysPro <char...@embsyspro.com> wrote: > >> Firstly, what you state has not been my experience and it did not and >> does not work on my devices. Perhaps there is another issue involved, >> but the only reason I went to such toil is expressly because I had to >> do so for every field to remain the same upon an orientation change. >> I've got both an android v2.2.1 device and an android v1.5 device and >> they both exhibit the behavior that I describe above. But both are >> from the same vendor and I'll need to investigate why I'm seeing what >> I'm seeing. >> > > Very strange. One of my Activities is a simple form with an EditText and > some Checkboxes. I do NOT save and restore state in this Activity. If I > enter text in the EditText and check some boxes, then rotate my phone, all > data is restored, as expected. > > This is on Nexus One 2.3.4, G1 with 1.6 and just ran it on a 1.5 AVD for > shits and giggles. All work as expected. > > It would be a sad state of affairs indeed if every developer had to > manually save and restore every single piece of static UI data in every > Activity in this fashion. > > Try getting rid of one of your save / restore combos and see what happens. > > >> Secondly, since I had suffered from the same problem as Suresh and the >> only answer he was receiving was advising him to RTFM I thought that I >> would try to help. >> > > I was not faulting you for trying to help, if that's what you took from my > post. My response to the OP was RTFM because his question was so vague and > generic and the concepts for his broad query are explained in the > documentation. > > > ------------------------------------------------------------------------------------------------- > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer hack...@android.com 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. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en