在Jquery Mobile或PhoneGap中禁用自动旋转 [英] Disable auto-rotate in Jquery Mobile or PhoneGap
本文介绍了在Jquery Mobile或PhoneGap中禁用自动旋转的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
虽然移动设备的跨平台开发是如此的好。没有一个简单的选项禁用自动旋转或锁定到一个方向,即肖像或风景。
在Jquery Mobile,PhoneGap,XUI中有没有任何地方?
如果是的话请帮助。
解决方案 > On iPhone将此添加到-info.plist:
< dict&
`.....
< array>
< string> UIInterfaceOrientationPortrait< / string>
< string> UIInterfaceOrientationPortraitUpsideDown< / string>
< / array>
..........
< / dict>
从Android到AndroidManifest.xml
< activity ........ android:screenOrientation =portrait>
Although cross platform development for mobile devices is so good. There isn't a simple option to disable auto-rotate or lock into one orientation i.e. portrait or landscape.
Is there anyway either in Jquery Mobile, PhoneGap, XUI anywhere ?
If yes then please help. Its driving me nuts.
解决方案
To complete the answer above.
On iPhone add this to -info.plist:
<dict>
`.....
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
..........
</dict>
on Android to AndroidManifest.xml
<activity ........ android:screenOrientation="portrait">
这篇关于在Jquery Mobile或PhoneGap中禁用自动旋转的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文