在手机的差距html页面花太多时间来加载 [英] In phone gap html page take too much time to load

查看:167
本文介绍了在手机的差距html页面花太多时间来加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好我正在使用的手机应用的差距在这项目的资源文件夹某些HTML页面。和我使用下面的code。但它需要太多的时间加载。
任何一个可以给予妥善解决?
谢谢!

 公共类JvdActivity扩展DroidGap {公共无效的onCreate(捆绑savedInstanceState){
    super.onCreate(savedInstanceState);
    super.init();
    键盘键盘=新的键盘(这一点,APPVIEW);
    appView.addJavascriptInterface(键盘,键盘);
    super.loadUrl(文件:///android_asset/www/index.html);
   }
}


解决方案

如果他们是HTML页面内大量的图片,然后加载屏幕需要一定的时间内该页面。

但如果这是你的项目的要求,则可以使用进度条说中..让用户可以等到页面被载入。

Hi I am making application using phone gap in which certain html pages in asset folder of project. and I am using the code below. but it takes too much time in loading. can any one give proper solution ? Thanks!

public class JvdActivity extends DroidGap {

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    super.init();
    KeyBoard keyboard = new KeyBoard(this, appView);
    appView.addJavascriptInterface(keyboard, "KeyBoard");
    super.loadUrl("file:///android_asset/www/index.html");
   }
}

解决方案

If their are lots Images inside the HTML page then to load that page Inside the screen It takes Time.

But if it is requirement of your project then you will use progress bar saying Loading.. so that user can wait till the page gets loaded.

这篇关于在手机的差距html页面花太多时间来加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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