Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
New Contributor
Posts: 8
Registered: ‎01-05-2012
My Device: Playbook
My Carrier: None

Orientation vs the simulator

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.

 

 

BlackBerry Development Advisor
Posts: 118
Registered: ‎11-01-2011
My Device: N/A
My Carrier: Rogers

Re: Orientation vs the simulator

Thanks for reporting this issue.  

 

What version of the simulator are you running?  

New Contributor
Posts: 8
Registered: ‎01-05-2012
My Device: Playbook
My Carrier: None

Re: Orientation vs the simulator

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.