From: Soren Stoutner Date: Thu, 24 Sep 2015 23:15:45 +0000 (-0700) Subject: Update progressBar before changing visibility. X-Git-Tag: v1.0~54 X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=273f3823a4bc9d82d993786b6a606f12101552b9;p=PrivacyBrowserAndroid.git Update progressBar before changing visibility. --- 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); } });