From ca8a66234c494e4bc654f9ea97298ac5728ace61 Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Wed, 11 Nov 2015 20:38:44 -0700 Subject: [PATCH] Remove app bar scrolling because it broke pinch to zoom and some web pages. --- .../com/stoutner/privacybrowser/Webview.java | 9 +-------- app/src/main/res/layout/activity_webview.xml | 16 ++++++---------- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/app/src/main/java/com/stoutner/privacybrowser/Webview.java b/app/src/main/java/com/stoutner/privacybrowser/Webview.java index ff718ff9..99a27344 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/Webview.java +++ b/app/src/main/java/com/stoutner/privacybrowser/Webview.java @@ -33,7 +33,7 @@ public class Webview extends AppCompatActivity { static ProgressBar progressBar; static EditText urlTextBox; static ImageView favoriteIcon; - static final String homepage = "https://www.google.com/"; + static final String homepage = "https://www.duckduckgo.com/"; // Remove Android Studio's warning about the dangers of using SetJavaScriptEnabled. @SuppressLint("SetJavaScriptEnabled") @@ -41,10 +41,6 @@ public class Webview extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - - // FEATURE_ACTION_BAR_OVERLAY is required to scroll the actionBar. - supportRequestWindowFeature(AppCompatDelegate.FEATURE_SUPPORT_ACTION_BAR_OVERLAY); - setContentView(R.layout.activity_webview); mainWebView = (WebView) findViewById(R.id.mainWebView); @@ -62,9 +58,6 @@ public class Webview extends AppCompatActivity { favoriteIcon = (ImageView) actionBar.getCustomView().findViewById(R.id.favoriteIcon); urlTextBox = (EditText) actionBar.getCustomView().findViewById(R.id.urlTextBox); progressBar = (ProgressBar) actionBar.getCustomView().findViewById(R.id.progressBar); - - // Scroll the actionBar. - actionBar.setHideOnContentScrollEnabled(true); } mainWebView.setWebViewClient(new WebViewClient() { diff --git a/app/src/main/res/layout/activity_webview.xml b/app/src/main/res/layout/activity_webview.xml index d085905f..d565fc0b 100644 --- a/app/src/main/res/layout/activity_webview.xml +++ b/app/src/main/res/layout/activity_webview.xml @@ -1,18 +1,14 @@ - - + android:layout_height="match_parent"> - + android:focusableInTouchMode="true" /> - + -- 2.43.0