// 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();
}
// 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());