On Fri, Aug 12, 2011 at 4:47 PM, Mark Murphy <[email protected]>wrote:
> On Fri, Aug 12, 2011 at 5:25 PM, Ian Dees <[email protected]> wrote: > > Now, when I rotate the screen the other fragments on my screen are having > > problems similar to the post here [0]. In the portrait orientation there > are > > three <fragment>'s sitting next to each other in the layout (each with a > > unique id like "frag_1".."frag_3"). In the landscape layout there are > five > > <fragment>'s (with ids like "frag_1".."frag_5"). When the system attempts > to > > inflate the 4th and 5th fragment it spits out the "did not create a view" > > error. > > You can't do that. AFAICT, if you use <fragment>, they must be the > same in all configurations that could change on the same device. So, > your portrait and landscape need to have the same <fragment> elements. > > If you want to have a different mix of fragments between portrait and > landscape, that's fine, but the best solution is to add the distinct > ones via FragmentTransactions. > > Where is this documented? I'm digging through FragmentManager code and not seeing this anywhere in the javadoc and I thought I did a decent job looking through the API doc online. Either way, thanks for your help. I'll try adding via code. -- 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

