Hi

I have different layouts for portrait and lanscape (very different
from each other), and I add all the fragments using transactions.

I have a VideoView inside one of my fragments, and it can´t be stopped
during the rotation.
So I am using the onConfigurationChanged method to avoid the activity
restart, since

But I can´t figure out how recreate my layout.

If I call setContentView(R.layout.videos_activity), it create the
layout with the correct (landscape/portrait) version, but it loses the
fragment state.

And if I don´t call the setContentView, it doesn´t create the correct
landscape/portrait layouts.

        public void onConfigurationChanged(Configuration newConfig) {
                super.onConfigurationChanged(newConfig);

                setContentView(R.layout.videos_activity);
        }

How can we solve this?

Thank you

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