12-02-2012 10:23 PM
Is anyone else seeing spooky orientation behaviour in the simulator?
For me, the very first time I install and run my app on the simulator, it correctly applies the landscape .bar setting, and the app works fine.
However, every time after this, it launches in portrait mode (with the game squashed into the wrong aspect ratio ... which I'm pretty sure if my code's doing - but the issue is why it's launching in portrait mode in the first place). So if I kill the app and restart it: BOOM portait mode. If I rebuild it in Momentics and run in it the simulator: BOOM portrait mode.
The only way to get landscape back seems to be deleting the app off the simulator and re-running it (and again, it will only run correctly once).
Is anyone else seeing this (I'm on OSX btw)?
If not, I'm wondering if this is some awful side-effect of the orientation code I had to write to get it all running correctly on the first version of the SDK.
12-18-2012 01:17 AM
After several late (late) nights I finally got it working.
The only way I could find to allow orientation that works on both the BB10 and the Playbook was to set the bar-descriptor Orientation to "Auto-orient", and then handle both the viewport and navigator orientation manually from the orientation change handler.
The one issue I hit was there is a *wicked* slowdown when calling navigator_set_orientation to get the navigator to re-orient. If I comment this out, my app re-orients instantly. As soon as I add this call in (which you need to to get the keyboard and gestures in the correct orientation), it hangs the app for (quite literally) 5 seconds+ when you change the device orientation.