]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java
Change the Searx instance. https://redmine.stoutner.com/issues/549
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / activities / MainWebViewActivity.java
index 8034dd68e3d507a67d8e18fd5c94212a0822092f..182a23f9ab62664d0f5ea0a7cdf379aaeacc2bef 100644 (file)
@@ -316,6 +316,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
     // Remove the warning about needing to override `performClick()` when using an `OnTouchListener` with `WebView`.
     @SuppressLint("ClickableViewAccessibility")
     protected void onCreate(Bundle savedInstanceState) {
+        // Enable the drawing of the entire webpage.  This makes it possible to save a website image.  This must be done before anything else happens with the WebView.
         if (Build.VERSION.SDK_INT >= 21) {
             WebView.enableSlowWholeDocumentDraw();
         }
@@ -1003,6 +1004,16 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                 // Consume the event.
                 return true;
 
+            case R.id.bookmarks:
+                // Get a handle for the drawer layout.
+                DrawerLayout drawerLayout = findViewById(R.id.drawerlayout);
+
+                // Open the bookmarks drawer.
+                drawerLayout.openDrawer(GravityCompat.END);
+
+                // Consume the event.
+                return true;
+
             case R.id.toggle_first_party_cookies:
                 // Switch the first-party cookie status.
                 cookieManager.setAcceptCookie(!cookieManager.acceptCookie());