Why would you need to handle the rotation changed event in the first
place?  I have a complex state data as well in some of my activities,
but I have no problems saving it using the normal callbacks.

On Apr 29, 2:54 am, Erik <[email protected]> wrote:
> 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 [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

Reply via email to