android笔记之在WebView中显示ProgressBar的两种方法

第一种方法是用系统的资源,这种方法只能将进度情况显示到标题栏中。英文是本文作者的一段唠叨,很简单,我就不用再翻译了吧。

When using the webview, something that drives me crazy, specially if you are in a place with a very slow internet connection, is not knowing what is happening with the webpage, is it loading? Is it stuck? …. AAAhhhh Nothing is happening. Ok don’t desperate, I am going to show you how to add a progress bar to your Webview layout in you app. 
After you know what to do is easy (As always).     

 

 

 

下面是第二种方法:英文是本文作者的一段唠叨,也很简单,我就不用再翻译了吧。和上面的方法不同的是,这个是进度没有显示在标题栏而是显示在页面的上面。

I’ve seen a multitude of posts on how to embed the Android WebView object and how to use the built-in feature request PROGRESS, but I’ve yet to come across a demonstration on just how simple it is to integrate a ProgressDialog object. I specifically needed this for one of my projects because I did not want the title bar to render in my application. If the title is not rendered, then the Window Feature Request progress bar and indeterminant functions will not render at all.

 

 

  • 1
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值