I have looked at a question similar to this here but as I am a newbie could someone explain how to get this to work in a WebView or at least how to set a 10 second time delay so people know that it's loading?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
I have just found a really good example of how to do this here: http://developer.android.com/reference/android/webkit/WebView.html . You just need to change the setprogress from:
to
For more reference click here http://androiddhina.blogspot.in/2015/05/android-load-webview-with-progressbar.html
It's true, there are also more complete option, like changing the name of the app for a sentence you want. Check this tutorial it can help:
http://www.firstdroid.com/2010/08/04/adding-progress-bar-on-webview-android-tutorials/
In that tutorial you have a complete example how to use the progressbar in a webview app.
Adrian.
This is how I did it with Kotlin to show progress with percentage.
My fragment layout.
My kotlin fragment in onViewCreated
wait until the process is over ...
For a horizontal progress bar, you first need to define your progress bar and link it with your XML file like this, in the
onCreate
:Then, you may use onProgressChanged Method in your WebChromeClient:
After that, in your layout you have something like this
This is how I did it in my app.