我正在开发一个cordova android应用程序来使用is浏览器加载网站,我不知道为什么在闪屏之后会有白色页面,所以我想摆脱它,这是我的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>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="cordova.js"></script>
<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="dev@cordova.apache.org" 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>
发布于 2016-07-28 19:34:16
由于您的应用程序的主题选择或可能是登录页面,白色页面正在显示您正在做的许多工作,这是在主thread.So中工作,它发生了。
最有可能的是,主题的选择取决于这个问题。
android:theme="@android:style/Theme.Translucent.NoTitleBar"有一次我遇到了同样的问题,我在清单file.So中设置了这个主题,我已经处理了这个问题。
谢谢,希望这能对你有所帮助:)
https://stackoverflow.com/questions/38634508
复制相似问题