首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >应用加载前闪屏后显示的白色页面(cordova-Android)

应用加载前闪屏后显示的白色页面(cordova-Android)
EN

Stack Overflow用户
提问于 2016-07-28 19:03:23
回答 1查看 1.4K关注 0票数 1

我正在开发一个cordova android应用程序来使用is浏览器加载网站,我不知道为什么在闪屏之后会有白色页面,所以我想摆脱它,这是我的index.html代码:

代码语言:javascript
复制
<!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:

代码语言:javascript
复制
<?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>

EN

回答 1

Stack Overflow用户

发布于 2016-07-28 19:34:16

由于您的应用程序的主题选择或可能是登录页面,白色页面正在显示您正在做的许多工作,这是在主thread.So中工作,它发生了。

最有可能的是,主题的选择取决于这个问题。

代码语言:javascript
复制
android:theme="@android:style/Theme.Translucent.NoTitleBar"

有一次我遇到了同样的问题,我在清单file.So中设置了这个主题,我已经处理了这个问题。

谢谢,希望这能对你有所帮助:)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38634508

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档