How To Add Progress Bar On WebView
How To Add Progress Bar On WebView show that you can show your sites loading progress in your application. Watch the video properly and follow these steps. All the codes can be copy pasted from here.Watch Video :
🎥 Embedded content (YouTube Video)
XML Codes :<ProgressBar
android:layout_width="wrap_content"
android:layout_height="match_parent"
style="?android:attr/progressBarStyle"
android:layout_centerHorizontal="true"
android:id="@+id/prg"/>Java Codes :public ProgressBarprogressBar;progressBar = (ProgressBar)findViewById(R.id.prg);{
@Override public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
progressBar.setVisibility(View.VISIBLE);
setTitle("Loading...");
}
@Override public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
progressBar.setVisibility(View.GONE);
setTitle(view.getTitle());
}
}On our next post we would go through changing the floating button and make it a share option.
Related Posts
Razorpay Integration in Android
May 19, 2022
Parsing JSON Data in Android
May 16, 2022
How to Install Android Studio on Windows
May 15, 2022
Comments (0)
Leave a Comment
No comments yet. Be the first to comment!