From 273f3823a4bc9d82d993786b6a606f12101552b9 Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Thu, 24 Sep 2015 16:15:45 -0700 Subject: [PATCH] Update progressBar before changing visibility. --- app/src/main/java/com/stoutner/privacybrowser/Webview.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/stoutner/privacybrowser/Webview.java b/app/src/main/java/com/stoutner/privacybrowser/Webview.java index bc8dd08d..16c52415 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/Webview.java +++ b/app/src/main/java/com/stoutner/privacybrowser/Webview.java @@ -48,12 +48,12 @@ public class Webview extends AppCompatActivity { // Update the progress bar when a page is loading. mainWebView.setWebChromeClient(new WebChromeClient() { public void onProgressChanged(WebView view, int progress) { + progressBar.setProgress(progress); if (progress < 100) { progressBar.setVisibility(View.VISIBLE); } else { progressBar.setVisibility(View.GONE); } - progressBar.setProgress(progress); } }); -- 2.45.2