]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
Update formattedUrlString on click.
authorSoren Stoutner <soren@stoutner.com>
Thu, 24 Sep 2015 23:22:09 +0000 (16:22 -0700)
committerSoren Stoutner <soren@stoutner.com>
Thu, 24 Sep 2015 23:22:09 +0000 (16:22 -0700)
app/src/main/java/com/stoutner/privacybrowser/Webview.java

index 16c524159d605fe17219b89f4a8420e0c2d21b4c..abbc170fb6a30061938a62d5a07529c51a34f4ba 100644 (file)
@@ -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;
             }