Giter Site home page Giter Site logo

hybridfoundation's Issues

关于splash解决白屏问题的一点意见

其实很早就下了代码了,最近也有时间看了下
首先呢,我现在做的项目也有很多动态更新的,跳转到Activity界面,这中间大概有2秒的白屏时间

我自己实际测试,解压代码并不需要多少时间,反而是webview的渲染,这里才是大头,所以我觉得只要监听webview加载完就隐藏Fragment即可,不需要那么复杂的设置延时,什么的吧。
监听:


   mWebview.setWebChromeClient(new WebChromeClient(){
      @Override public void onProgressChanged(WebView mWebView, int num) {
        super.onProgressChanged(mWebView, num);
        if (100==num){
          hideTranstion();
        }
      }
    });

PS:我很久没用RXjava了,所以不知道理解你代码中的Splash处理有不有错

当然楼主的使用fragment显示页面这个ideal很赞.

当然其实你可以看看Cordova中的处理,很健全,因为我现在项目用的是ionic,所以基本使用他来加载的

最后,谢谢你的分享,对于H5的差异化区别,然后下载新编写即可,我也准备研究,不知道能不能分享一下

Update on other resources

1.例如图片的请求。或者是css的请求。通过加载本地HTML只能解决部分问题。所以应该好需要h5页面中请求的拦截。

SplashFragment_.builder().build()

  1. SplashFragment_.builder().build()
    can not resolve symbol "SplashFragment_."( SplashFragment_. 这个在代码中标红,并且找不到)
    2 Manifest.xml里面的
    MainActivity_" 也报红找不到,需要新建
    这是怎么回事?谢谢~

不能implements吗

不能implements吗,你的demo我run的时候报错解决不了
Unable to find method 'org.gradle.api.tasks.compile.CompileOptions.getBootClasspath()Ljava/lang/String;'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.