Thanks for your very helpful feedback Tom and Goncalo :) Kind regards, Ronny Dahl (+47 909 72 744)
Keywork AS http://www.keywork.no/ From: monodroid-boun...@lists.ximian.com [mailto:monodroid-boun...@lists.ximian.com] On Behalf Of Tom Opgenorth Sent: Wednesday, December 12, 2012 3:52 PM To: Discussions related to Mono for Android Subject: Re: [mono-android] Multi-screen applications with alternating layouts Well, to be clear, I'm not sure that is what is tripping up the designer - that is just a guess on my part. It might be worth-while to log a bug at bugzilla.xamarin.com<http://bugzilla.xamarin.com>. What Goncalo suggested is probably your best bet. This is a personal preference, but you could also edit the layout files by hand as well, and not worry about using the designer. That said, adding controls programatically can be a bit tricky, but heres an example of some code that would be in OnCreate: var layout = new LinearLayout(this); // this is the Actitivy; var button = new Button(this); layout.AddView(button); var textView = new TextView(this); layout.AddView(textView); SetContentView(layout); On Wed, Dec 12, 2012 at 2:59 AM, Goncalo Oliveira <gonc...@minkan.net<mailto:gonc...@minkan.net>> wrote: Since you want to support API 8, why don't you stick with layout/layout-land/layout-large/layout-large-land? These work well with newer API levels. And so far, the designer has behaved correctly with those (leaving apart a few bugs). On 12 December 2012 06:12, Ronny Dahl <ronny.d...@keywork.no<mailto:ronny.d...@keywork.no>> wrote: Hi Tom, Thanks for your feedback. Since I have to support API level 8 and upwards I'll add support for both flavors (layout-sw* for API level 13 and upwards and layout-large for those between 8 and 13). But if the designer doesn't work then I have to add controls programmatically instead. Can you please point me in the right direction for doing that? Kind regards, Ronny Dahl (+47 909 72 744<tel:%28%2B47%20909%2072%20744>) Keywork AS http://www.keywork.no/ From: monodroid-boun...@lists.ximian.com<mailto:monodroid-boun...@lists.ximian.com> [mailto:monodroid-boun...@lists.ximian.com<mailto:monodroid-boun...@lists.ximian.com>] On Behalf Of Tom Opgenorth Sent: Thursday, December 6, 2012 5:19 PM To: Discussions related to Mono for Android Subject: Re: [mono-android] Multi-screen applications with alternating layouts I usually do my Android layouts by hand, so I can't speak directly about the designer, however, one thought does come to mind. The smallest-width qualifier wasn't introduced until Android 3.2 (API Level 13). It will be ignored by earlier versions of Android. I wonder if maybe your targeted version is < Android 3.2, which is causing the Designer some problems? Again, just a theory, but might be worth checking out. On Thu, Dec 6, 2012 at 5:25 AM, Ronny Dahl <ronny.d...@keywork.no<mailto:ronny.d...@keywork.no>> wrote: Fellow developers, I have used both MonoDroid and Mono for Android about a year with emphasis on MonoTouch. Lately I have been tasked to develop an Android application as well. Seeing that Android comes in many flavors size-wise I have read some of Xamarins documentation on the subject of Multiscreen applications, but alas, I cannot get it to work. My issues are as follows: - When I include alternating layouts such as /Resources/layout-sw720dp/Main.axml the designer opens and I am not able to switch back to the original layout (/Resources/layout/Main.axml) any more (in the designer that is - can still see the XML). - When I do changes to the alternate layout, it happens more often than not that the original layout is updated as well. I have also experiences several times that if I have alternating layouts, the entire directory is removed when I try to do changes to the respective layout. - Side note: I noticed earlier that the device list on the designer toolbar had many entries in it. Now it is completely empty. My development environment: - Both MonoDevelop and Visual Studio 2010/2012 on three different computers (with valid licenses). I reinstalled one of my laptops an hour ago, created a new Android application with one of the default templates and the above-mentioned issues still apply. My computers are quite new so neither performance/drivers should be an issue. Any ideas or suggestions? Regards, Ronny Dahl _______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com<mailto:Monodroid@lists.ximian.com> UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid -- http://www.opgenorth.net _______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com<mailto:Monodroid@lists.ximian.com> UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid -- Gonçalo Oliveira _______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com<mailto:Monodroid@lists.ximian.com> UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid -- http://www.opgenorth.net
_______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid