search

Home  >  Q&A  >  body text

android - webview 自定义加载进度条


上图是sf自己的进度条,如果要实现像如图的进度条,求给个思路,thx

伊谢尔伦伊谢尔伦2772 days ago654

reply all(4)I'll reply

  • 黄舟

    黄舟2017-04-17 17:41:58

    You have to customize the control, define the drawing rules and draw it yourself. It's quite troublesome. You can look for the following open source libraries to see if there are similar wheels. I remember that NGA’s pull-down refresh is similar to this style. You can go to github to find it.

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 17:41:58

    This effect is actually very simple. For example, the loading on the open source Aisen-SinaWeibo has this effect. The specific idea of ​​this effect is a LinearLayout (orientation==vertical) and then a scroll bar at the top. Below is the webView. The webView monitors the loading. There is no need to emphasize the code. The progress bar above is an open source control. You can find it on Github.

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 17:41:58

    Customize a ProgressBar separately (or use a style). There are corresponding methods in WebChromeClient to obtain the web page loading progress, and use this to update the bar... Of course, it can also be directly integrated into a custom WebView.. ....Well, that’s what I thought

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 17:41:58

    ! The old version of SwipeLayout has this effect

    reply
    0
  • Cancelreply