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: