android – Cordova忽略屏幕方向锁

参见英文答案 > fix the orientation on page to landscape only in Jquery-mobile3个
我正在使用Cordova 3.3.0和我的galaxy S3(运行最新的Cyanogenmod)来测试我正在处理的应用程序;我需要应用程序屏幕保持“纵向”模式并即使用户旋转设备也会被锁定.无论我尝试过什么或我遵循的教程,应用程序都忽略了锁定屏幕的首选项.我究竟做错了什么?

这是我的config.xml:

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.numediaweb.test" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Test</name>
    <description>
        Test.</description>
    <author href="http://test.com" email="abdel@test.com">
        me
    </author>
    <content src="index.html" />
    <access origin="*" />
    <preference name="orientation" value="portrait" />
    <preference name="fullscreen" value="true" />
    <preference name="SplashScreen" value="splash" />
    <preference name="SplashScreenDelay" value="3000" />
</widget>

解决方法

修正了Cordova 3.4.1.
现在偏好方向有效!
<preference name="orientation" value="portrait" />

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...