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.
09-03-2012 11:01 PM
I'm using the Dev Alpha to build an application that works in portrait and landscape mode.
In the browser, this works perfectly using the CSS from the kitchen sink example:
However, when I use the same CSS in the WebWorks app I'm building it doesn't work. I've opened the resource via the Dev Alpha's browser and it works fine.
The behaviour it exhibits is that the screen will not rotate while in my app. I have to switch to the app switcher / home screen and keep the device rotated, then switch back to the app after the device does the rotation animation.
Once I'm back in the application, my media queries for orientation never take effect. It seems as though the browser is making a "best guess" at what the dimensions should be based on the orientation in which the application was launched.
I have tested that both orientations work fine if the application is launched in the intended orientation. However, upon rotating the device, the application exhibits "odd" rendering behaviour. It's apparent that the orientation event isn't firing, causing the CSS to never be recalculated.
09-04-2012 01:06 AM
As far as I know the WebWorks app container is buggy with switchting between portrait and landscape mode, so it might not work until it is fixed. When I run an app on mine in portrait and switch device to landscape the app is stretched to fill the screen and this isn't the behaviour it should have if the switch would work well.
09-04-2012 01:12 AM
In android, the manifest.xml file has some control over the allowed orientations. Is there an analogue in BlackBerry's config.xml that would work in a similar way?
Otherwise, can the webworks dev team speak as to a workaround and timeline for a fix?
How's the kitchensink app working (in theory), since it uses the same css?
09-04-2012 01:25 AM
There is a config.xml documentation for the orientation but as far as I know switching the orientation is buggy in BB10 so far at will not be used at this time until they fix it. But you might be able to use the config.xml to define the setting for the running app to be in landscape mode or in portrait mode and it should stay in that mode as far as you do not minimize the app to background and rotate the screen. If so you can see it will be stretched really badly.
09-04-2012 02:05 AM
And fix appears to be in the works:
09-04-2012 02:10 AM
Yes. Definitely they are working on a fix for that.