English 中文(简体)
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:

this.controller.setWindowOrientation("free");

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

TheBounder.

最佳回答

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

问题回答

暂无回答




相关问题
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: this.controller....

How to set default language in WebOs

How can I set the dault language of an WebOs project? The standard way of adding internationalization in WebOS is to use the $L() function, where I can set a key to the translated string. But if the ...

push scene by tapping on image

push scene by tapping on image. i am using one image when i am tap that image i want to push the new scene. it is not working. is there any way to push the scene when tap on image controle it showing ...

Is it possible to use d8 to measure memory usage?

With the release of the Closure compiler, I was hoping to see if there was a difference in memory usage between a js file using the compiler and one which had not. In particular, on a mobile ...

热门标签