R – Orientation Questions – palm pre webos


Just a couple of quick questions…not too hard to answer hopefully!

How do I set the allowed orientation from scene to scene?

I can set it for the entire stage with:


but I want to be able to set it for each scene, some of which I don't want any rotation…

Any ideas?

Also, is there any way to restrict the orientation to just up and down (portrait and reverse portrait) and not have a rotation on landscape?

Many thanks


Best Solution

1)use the following code in scenes which one you want to set orientation

if (this.controller.stageController.setWindowOrientation) { this.controller.stageController.setWindowOrientation("free"); }

2) for your second question set the orientation left and right only it will work

Related Question