我使用的是Phonegap构建服务(来自Dreamweaver CS6),并且我一直在使用这个模板:http://themeforest.net/item/tiger-jquery-mobile-web-template-web-app/3018322,它包含大量的js和css文件。问题是,当闪屏消失时,应用程序没有加载正确显示应用程序所需的所有js和css文件,并且一些功能(适用于Android)不起作用。此外,当我启动Android应用程序时,它看起来像一个没有css的网页,但几秒钟后它就能正确地显示应用程序。
发布于 2013-06-14 07:45:40
你是否遵循phonegap documentation添加了一个闪屏?
假设您使用的是最新版本的phonegap (2.8.0),请将以下代码行添加到扩展phonegap的主要java类中:
super.setIntegerProperty("splashscreen", R.drawable.splash);
super.loadUrl(Config.getStartUrl(), 10000);
然后在你的应用程序JS中:
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
navigator.splashscreen.hide();
}
https://stackoverflow.com/questions/17091525
复制相似问题