In my application I have 2 fragments existing in 1 activity. On orientation change, I would like to have my 2nd fragment to use a different layout and since I have my Activity set with android:configChanges="orientation" in the manifest, changes will be managed by the Activity. So I would have to replace my second fragment with a new instance of the same fragment but I am not sure how to do this since both fragments are inside of a ViewPager as well. I originally found this snippet of code: http://pastebin.com/5Ycna2cg but I am not clear on certain parts.. Like, what is mSavedState and why is it adding null to it? The original source of this code is found here: http://stackoverflow.com/questions/7723964/replace-fragment-inside-a-viewpager
If someone can give me a clear explanation of how this is done I would be greatly appreciated. Also, the reason I am not letting the application recreate everything on orientation change is because I have some complex data I want to retain. -- 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

