【发布时间】:2015-05-07 06:17:38
【问题描述】:
我有一个使用 adobe phonegap-build 创建的 phonegap 应用程序,我有 2 个非常困难的简单问题!修复。
似乎我所做的一切,都没有多大用处。
1)在android中,我希望应用全屏(没有“home”、“return”、“multi-window”栏),全屏!
2)我希望应用程序仅是横向的,大多数情况下都是这样,但是在开始的几秒钟内(进入应用程序时),方向是纵向的,只有在几秒钟后它才会自行修复,一点都不好
这是我的 cordova config.xml 中的代码:
<preference name="orientation" value="landscape" />
<preference name="screen-orientation" value="landscape" />
<preference name="permissions" value="none" />
<preference name="target-device" value="universal" />
<preference name="fullscreen" value="true" />
<preference name="webviewbounce" value="true" />
<preference name="prerendered-icon" value="true" />
<preference name="stay-in-webview" value="false" />
<preference name="ios-statusbarstyle" value="black-opaque" />
<preference name="detect-data-types" value="true" />
<preference name="exit-on-suspend" value="false" />
<preference name="show-splash-screen-spinner" value="true" />
<preference name="auto-hide-splash-screen" value="true" />
<preference name="disable-cursor" value="false" />
<preference name="android-minSdkVersion" value="7" />
<preference name="android-installLocation" value="auto" />
<preference name="Fullscreen" value="true" />
<preference name="EnableViewportScale" value="true" />
<preference name="DisallowOverscroll" value="true" />
<preference name="UIWebViewBounce" value="false" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="SplashScreenDelay" value="10000" />
我还有一个处理锁屏的插件:
<gap:plugin name="net.yoik.cordova.plugins.screenorientation" version="1.3.1" />
在 iphone 上一切都很好,但在 android 中,我该如何解决这些问题?
也许这会有所帮助?
http://docs.build.phonegap.com/en_US/configuring_config_file_element.md.html
http://stackoverflow.com/questions/4675750/lock-screen-orientation-android
为了更好地理解上传到 phonegap build 的程序结构:
-css
-img
-js
-lib (libraries like angular,jquery and such)
-modules (all the html here)
-res (icons and screen for splash and such)
-spec (tests)
application.js (my all javascript minified here)
config.xml
icon.png
index.html
spec.html
splash.png
所有这些文件每次都被压缩,并上传到 phonegap-build
【问题讨论】:
标签: android cordova screen-orientation