I have an app that should be in landscape but, seems to be stuck in portrait no matter what I do. Clearly corona is ignoring the build.settings file so my question is.
How do I get the app to start as landscape using corona cards?
I have an app that should be in landscape but, seems to be stuck in portrait no matter what I do. Clearly corona is ignoring the build.settings file so my question is.
How do I get the app to start as landscape using corona cards?
You have to set that in the Windows Visual Studio settings or in c# / vb code
http://msdn.microsoft.com/en-us/library/windows/apps/dn495655.aspx
http://msdn.microsoft.com/en-us/library/windows/apps/ff402575(v=vs.105).aspx
http://code.msdn.microsoft.com/windowsapps/Display-Orientation-Sample-19a58e93
Good Luck Larry
I don’t get the options shown in the first link so i guess I need to code in an orientation?
You set the orientation in your “MainPage.xaml” file’s xml according to Microsoft’s documentation. That’s the simplest solution and how Microsoft wants you to do it. Coding it will work too, but doing it via XML is simpler.
Do the following:
Double click on “MainPage.xaml” in Visual Studio’s “Solution Explorer” panel.
Observe the Page node in the XML editor.
Change the “SupportedOrientations” attribute’s value to “Landscape”.
Change the “Orientation” attribute’s value to “LandscapeRight”.
That’s it!
Brilliant thank you. I was head scratching for a while on this. Oddly this is the way I normally do it on windows but, for some reason thought that it wouldn’t work with Corona due to your using build.settings and config.xml. I guess I’m still thinking in standard corona mode
IM guessing to make it more consistent with Corona work flow, that eventually the build settings will be used /included into the MainPage code?
The “build.settings” file is not used by CoronaCards; not by Android, iOS, or WP8. Nor is it used by Corona Enterprise for Android.
(Corona Enterprise for iOS is a special case because, unlike Android, it isn’t implemented as a library.)
The “build.settings” file is a Corona Simulator concept only which tells our build server to overwrite the app’s XML or plist settings. The keyword being “overwrite”. For native development, developers wouldn’t want some rogue 3rd party library overwriting the XML/plist settings that they may have painstakingly configured. No 3rd party library/sdk does this. Especially in the Windows environment. Native developers are going to want to configure their apps the way they’re used to doing it according to Microsoft, Google, or Apple’s documentation. That’s just their expectation.
So, bottom line, we have no intention of ever adding support for “build.settings” to the native version of our SDK. But that’s not a bad thing. In fact, it’s better because you’ll have absolute control over how to configure your app.
(Note: On Android, this is especially true because the AndroidManifest.xml configuration can actually get quite complex.)
You have to set that in the Windows Visual Studio settings or in c# / vb code
http://msdn.microsoft.com/en-us/library/windows/apps/dn495655.aspx
http://msdn.microsoft.com/en-us/library/windows/apps/ff402575(v=vs.105).aspx
http://code.msdn.microsoft.com/windowsapps/Display-Orientation-Sample-19a58e93
Good Luck Larry
I don’t get the options shown in the first link so i guess I need to code in an orientation?
You set the orientation in your “MainPage.xaml” file’s xml according to Microsoft’s documentation. That’s the simplest solution and how Microsoft wants you to do it. Coding it will work too, but doing it via XML is simpler.
Do the following:
Double click on “MainPage.xaml” in Visual Studio’s “Solution Explorer” panel.
Observe the Page node in the XML editor.
Change the “SupportedOrientations” attribute’s value to “Landscape”.
Change the “Orientation” attribute’s value to “LandscapeRight”.
That’s it!
Brilliant thank you. I was head scratching for a while on this. Oddly this is the way I normally do it on windows but, for some reason thought that it wouldn’t work with Corona due to your using build.settings and config.xml. I guess I’m still thinking in standard corona mode
IM guessing to make it more consistent with Corona work flow, that eventually the build settings will be used /included into the MainPage code?
The “build.settings” file is not used by CoronaCards; not by Android, iOS, or WP8. Nor is it used by Corona Enterprise for Android.
(Corona Enterprise for iOS is a special case because, unlike Android, it isn’t implemented as a library.)
The “build.settings” file is a Corona Simulator concept only which tells our build server to overwrite the app’s XML or plist settings. The keyword being “overwrite”. For native development, developers wouldn’t want some rogue 3rd party library overwriting the XML/plist settings that they may have painstakingly configured. No 3rd party library/sdk does this. Especially in the Windows environment. Native developers are going to want to configure their apps the way they’re used to doing it according to Microsoft, Google, or Apple’s documentation. That’s just their expectation.
So, bottom line, we have no intention of ever adding support for “build.settings” to the native version of our SDK. But that’s not a bad thing. In fact, it’s better because you’ll have absolute control over how to configure your app.
(Note: On Android, this is especially true because the AndroidManifest.xml configuration can actually get quite complex.)