Re: [android-developers] Android CL and onRetainNonConfigurationInstance
On Fri, Aug 12, 2011 at 5:25 PM, Ian Dees <ian.dees@gmail.com> 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.
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy
Android Training...At Your Office: http://commonsware.com/training
--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home