简体   繁体   English

android浏览器的android进度栏

[英]android progress bar for android browser

I am making android browser app and completed 90%. 我正在制作android浏览器应用程序,并完成了90%。 I just want to know how can,I put some progress bar on my application so that people can see that page is loading and they have to wait. 我只是想知道如何,我在应用程序上放置了一些进度条,以便人们可以看到该页面正在加载并且他们必须等待。

like this while the browser is uploading a page somewhat a this type of bar shows at top of the sccreen 这样,当浏览器上传页面时,这种类型的条形图会显示在屏幕顶部

http://cdn.css-tricks.com/wp-content/uploads/2011/02/progressbars-fine.png http://cdn.css-tricks.com/wp-content/uploads/2011/02/progressbars-fine.png

thank you in advance 先感谢您

The developer docs for WebView show you how to do this. WebView的开发人员文档向您展示了如何执行此操作。

You need to set a WebChromeClient on the WebView, and override the onProgressChanged method. 您需要在WebView上设置WebChromeClient ,并覆盖onProgressChanged方法。 Inside of this method you can then set the progress on the progressbar in your apps UI. 然后,您可以在此方法的内部,在应用程序用户界面的进度条上设置进度。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM