简体   繁体   中英

White page showing after splash screen before app load (cordova-Android)

I'm developing a cordova android application to load a website using an inappbrowser , I don't know why i have white page after the splash screen , so i want to get rid from it , here is my index.html code :

 <!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> 

and here is my 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> 

white page is showing due to theme selection of your app or may be landing page you are doing many works and that is working in main thread.So, it happened.

Most probably theme selection is depends upon this issue.

android:theme="@android:style/Theme.Translucent.NoTitleBar"

One time i have same problem and i have set this theme in manifest file.So, I have handled this problem.

Thanks, Hope this will help you :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM