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.
08-06-2012 06:57 PM
On rotation, does WebWorks have any support for auto resize or layout? Or when I get a rotation event, do I have to manually move things around to fit the new orientation?
Solved! Go to Solution.
08-07-2012 02:47 AM
If you have layout based on percents, and width of main container set to 100% (all other sizes as relative), then during rotation screen will fit to new width reformating webworks page
I'm not sure, but on newer devices css media query should work as they are part of the standard, so you could have autoadjusting layout which will follow rotation changes (by example action bar hiding when in portrait mode, or moving itself to right).
08-07-2012 09:57 AM
Great answer gluth!
I wanted to add a few comments of my own:
The Web engine will automatically try to resize your content when you change the orientation of the device. If you have a good viewport, and as gluth mentioned, are using relative sizing then it should scale according to the new screen width.
However, you can also listen for the orientation change event:
Finally, media queries are supported on PlayBook and BlackBerry 10 Dev Alpha. These powerful techniques makes it easy to design CSS for different screen orientations: