PhoneGap的2.0 - 在应用之前,我的应用程序加载推出白色屏幕闪烁 [英] Phonegap 2.0 - on app launch a white screen flashes prior to my app loading

查看:164
本文介绍了PhoneGap的2.0 - 在应用之前,我的应用程序加载推出白色屏幕闪烁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你如何摆脱对安卓/ PhoneGap的应用程序启动时的白色屏幕闪烁的?这似乎呈现出一秒钟的activity_main.xml中,我试图改变背景色为黑色,使其不太明显。我假设有一种方法来隐藏干脆?

How do you get rid of the white screen flash on android/phonegap application launches? It appears to be showing the activity_main.xml for a split second, I have tried changing the background color to black to make it less noticeable. I assume there is a way to hide that altogether?

推荐答案

的问题是需要的WebView被实例化第一,它默认为空白页面,然后使用loadURL被称为它的应用程序加载code。要解决它的方法之一是显示一个启动画面,直到您的应用程序在后台加载。

The problem is the WebView needs to be instantiated first and it defaults to a blank white page and then loadUrl is called which loads your application code. One way to get around it is to show a splashscreen until your app is loaded in the background.

<一个href=\"http://stackoverflow.com/questions/8156841/phonegap-splash-screen-for-android-app/8157103#8157103\">phonegap - 闪屏的Andr​​oid应用

这篇关于PhoneGap的2.0 - 在应用之前,我的应用程序加载推出白色屏幕闪烁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆