Android   发布时间:2022-04-28  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了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="@R_607_10107@://www.w3.org/ns/widgets" xmlns:cdv="@R_607_10107@://cordova.apache.org/ns/1.0">
    <name>Test</name>
    <description>
        Test.</description>
    <author href="@R_607_10107@://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>

解决方法

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

大佬总结

以上是大佬教程为你收集整理的android – Cordova忽略屏幕方向锁全部内容,希望文章能够帮你解决android – Cordova忽略屏幕方向锁所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。