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.


Wait a second... if I am going to do this in code/dynamically, how do I
decide whether to add 3 or 5? What if the screen is really big and I want to
put 10 fragment-thingers on the screen in a 2x5 array? Do I lose the ability
to have declarative layouts (that survive orientation changes) with
fragments?

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