08-06-2012 12:14 AM
08-06-2012 01:23 AM
Is it already possible to programmatically force an orientation (landscape in my case) and temporarily lock the device to this orientation? I desperately need this for my app.
From what I know there is a bug and the orientation from a config.xml file isn't really considered at this time. If this got fixed in the next update of either WebWorks or the Dev Alpha OS it should work by adding this line to your config.xml file:
<!-- The rim:orientation element specifies the orientation for screens in BlackBerry WebWorks application. --> <rim:orientation mode="landscape" />
08-08-2012 09:31 AM
Marco, no we don't yet have a programmatic way of doing this at runtime. You can currently lock orientation to portrait or landscape at compile time.
I suspect a custom extension may allow you to change the properties of the WebView object container, but this hasn't been proven whether it would force orientation after the object has already been staged.
09-20-2012 05:07 AM
09-20-2012 06:15 AM
09-20-2012 12:13 PM
Just to clarify. Specify orientation of the app via config.xml will be available at our next release:
The ability to change orientation lock via an api at execution is defined, but is not yet done:
Please be aware that the way to set initial orientation is a little different in order to align better with the W3c:
<param name="mode" value="portrait" />
This feature will only be available at the root of the config.xml, not nested below access elements, and applies to the entire application.