From: Soren Stoutner Date: Thu, 24 Sep 2015 23:22:09 +0000 (-0700) Subject: Update formattedUrlString on click. X-Git-Tag: v1.0~53 X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=e86f193379868c495d5b48a76cbdedc06a03f3a9;p=PrivacyBrowserAndroid.git Update formattedUrlString on click. --- diff --git a/app/src/main/java/com/stoutner/privacybrowser/Webview.java b/app/src/main/java/com/stoutner/privacybrowser/Webview.java index 16c52415..abbc170f 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/Webview.java +++ b/app/src/main/java/com/stoutner/privacybrowser/Webview.java @@ -36,10 +36,11 @@ public class Webview extends AppCompatActivity { progressBar = (ProgressBar) findViewById(R.id.progressBar); // setWebViewClient makes this WebView the default handler for URLs inside the app, so that links are not kicked out to other apps. - // Save the URL to urlTextBox before loading mainWebView. + // Save the URL to formattedUrlString and update urlTextBox before loading mainWebView. mainWebView.setWebViewClient(new WebViewClient() { public boolean shouldOverrideUrlLoading(WebView view, String url) { - urlTextBox.setText(url); + formattedUrlString=url; + urlTextBox.setText(formattedUrlString); mainWebView.loadUrl(url); return true; }