I have an Activity with different layouts for portrait and landscape.
Since it has some complex state data I don't want to lose on rotation,
I'm listening for rotation config changes. In onConfigurationChanged()
I call setContentView() to rebuild the view hierarchy using the new
layout.

Now I'm converting the activity to use a Fragment. I want the Fragment
to behave just like the Activity, rebuilding the view hierarchy with
the new layout when it gets onConfigurationChanged(), but there
doesn't seem to be any way to change a Fragment's view after it's been
created. The only way seems to be to create a new Fragment, but then I
lose all the state data from the original Fragment.

Does anyone have any ideas on how to make this work?

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

Reply via email to