You will have to write your code in such a way that on change of orientation, you bring up all the views that were present before,.
The default behaviour is, the Acitivity is created from the onCreate() method, after the change of orientation. Kumar Bibek On Jan 27, 11:09 pm, TreKing <[email protected]> wrote: > On Wed, Jan 27, 2010 at 11:36 AM, BobMorane <[email protected]> wrote: > > I believe that's because the main.xml file is reloaded so all the > > views that are not described in the xml are gone. > > Yup > > Is there a nice way to keep the same view hierarchy when going to > > > landscape mode and not lose the views added dynamically? > > Override onSaveInstanceState and onRestoreInstanceState to save / restore > information about the dynamic views that need to be re-added. > > ------------------------------------------------------------------------------------------------- > TreKing - Chicago transit tracking app for Android-powered > deviceshttp://sites.google.com/site/rezmobileapps/treking -- 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

