X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Factivities%2FMainWebViewActivity.java;h=182a23f9ab62664d0f5ea0a7cdf379aaeacc2bef;hb=657cff27042eeaf0a2445e0c911b4a766cab73df;hp=8034dd68e3d507a67d8e18fd5c94212a0822092f;hpb=b55485cdd89be2ad6291f58be79ad839762867b8;p=PrivacyBrowserAndroid.git diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java index 8034dd68..182a23f9 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java @@ -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());