12-01-2010 09:39 PM
I noticed in Burrito you can select to support auto orientation:
// support autoOrients
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
So in order to change from landscape to portrait, I'm guessing you would listen for an event indicating the orientation has changed.....and then do you clear the display and re-draw it? Not being able to rotate the simulator, I don't know what would happen to my display when it happens. I am not using containers, just x and y coordinates. If I used containers, would that change how I need to handle rotation of the PlayBook?
12-02-2010 07:50 AM
Very good question. The simulator does not support re-orientation yet, but listening for the change is a start. Right now, the mode of development is based on coordinates and not on a layout manager. In theory, if your coordinate base, you could keep two sets of coordinates based on the orientation of the device and use the Tweener to move the controls from one place to another. A layout manager where controls are based on percentWidth and percentHeight (which is not a part of the BB framework), the layout manager would take care of most of this. However, depending on your application. A control that might be in one location (e.g. top right), when re-oriented, but be better to be in a different relative location (e.g. bottom right). So layout manager might not help in those situations. I am planning for this capability to be a little bumpy when it becomes available unless we get some support to do this easily from the SDK.
12-02-2010 11:51 AM
I suspect that orientation change will be served, by some event in main sprite, in reaction of this we will have to relayout controls, or use setSize function on main container object.
We have to wait for SDK support here, we are talking about next summer sunny days.