[android-developers] EditText Handling while Orientation change

2010-02-01 Thread Muthu Kumar K.
Hi All,

I have EditText in my application. While entering the text i am
changing the portrait mode to landscape mode. Not the entered text is
resetting. Can any one tell me how do i handle this? Like if i change
the orientation what ever entered text should be remain as it is.

Thanks in Advance,
Muthu Kumar K.

-- 
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


Re: [android-developers] EditText Handling while Orientation change

2010-02-01 Thread Mark Murphy
 I have EditText in my application. While entering the text i am
 changing the portrait mode to landscape mode. Not the entered text is
 resetting. Can any one tell me how do i handle this? Like if i change
 the orientation what ever entered text should be remain as it is.

Android will automatically handle the contents of EditText on an
orientation change if you use all of the defaults and have all
uniquely-ID'd widgets. Hence, if it is not working for you, something is
incorrect inside of your app, such as:

-- You overrode onSaveInstanceState() and did not chain to the superclass

-- The EditText shares an android:id with some other widget in the layout

You are welcome to manually maintain the state of the EditText yourself
via onSaveInstanceState()/onRestoreInstanceState(), if the built-in
support does not meet your needs.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


-- 
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