白色页面显示应用加载之前的启动画面(科尔多瓦安卓)
问题描述:
我正在开发一个科尔多瓦android应用程序加载一个网站使用inappbrowser,我不知道为什么我有闪屏后的白色页面,所以我想从它去掉,这是我的index.html代码:白色页面显示应用加载之前的启动画面(科尔多瓦安卓)
<!DOCTYPE html>
<html>
<head>
<meta name="format-detection" >
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
<title>InApp Browser</title>
</head>
<body>
\t \t
\t \t
<script type="text/javascript" src="js/jquery.js"></script> \t
\t \t <script type="text/javascript" src="cordova.js"></script>
\t \t <script type="text/javascript" src="js/app.js"></script>
</body>
</html>
这里是我的config.xml:
<?xml version='1.0' encoding='utf-8'?>
<widget id="tn.example.inapptest" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>inapptest</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="[email protected]" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
<splash src="res/screen/android/splash-port-hdpi.png" density="port-hdpi"/>
<splash src="res/screen/android/splash-port-ldpi.png" density="port-ldpi"/>
<splash src="res/screen/android/splash-port-mdpi.png" density="port-mdpi"/>
<splash src="res/screen/android/splash-port-xhdpi.png" density="port-xhdpi"/>
<icon src="res/screen/android/ldpi.png" density="ldpi" />
<icon src="res/screen/android/mdpi.png" density="mdpi" />
<icon src="res/screen/android/hdpi.png" density="hdpi" />
<icon src="res/screen/android/xhdpi.png" density="xhdpi" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<preference name="SplashScreenDelay" value="50000" />
<preference name="FadeSplashScreen" value="false"/>
<preference name="SplashScreenBackgroundColor" value="0xFFFFFFFF"/>
<plugin name="cordova-plugin-inappbrowser" spec="~1.4.0" />
<plugin name="cordova-plugin-dialogs" spec="~1.2.1" />
</widget>
答
白页显示由于您的应用程序的主题选择或可能是着陆页,你正在做很多工作,这是在主线程工作。所以,它发生了。
最可能的主题选择取决于这个问题。
android:theme="@android:style/Theme.Translucent.NoTitleBar"
有一次我有同样的问题,我已经在清单file.So设定这个主题,我已经处理了这个问题。
感谢,希望这将帮助你:)
没有,Android电子 – Saveen
它不工作 –
我做同样的事情,一个清单文件,可能是你正在做的事情沉重登陆page.So,花了时间 – Saveen