]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
Add the option to move the app bar to the bottom of the screen. https://redmine.stout...
authorSoren Stoutner <soren@stoutner.com>
Thu, 20 May 2021 19:51:00 +0000 (12:51 -0700)
committerSoren Stoutner <soren@stoutner.com>
Thu, 20 May 2021 19:51:00 +0000 (12:51 -0700)
87 files changed:
.gitignore
.idea/assetWizardSettings.xml
app/src/free/res/layout/adview.xml [deleted file]
app/src/free/res/layout/adview_bottom_appbar.xml [new file with mode: 0644]
app/src/free/res/layout/adview_top_appbar.xml [new file with mode: 0644]
app/src/main/assets/de/about_licenses.html
app/src/main/assets/en/about_licenses.html
app/src/main/assets/es/about_licenses.html
app/src/main/assets/fr/about_licenses.html
app/src/main/assets/fr/guide_tracking_ids.html
app/src/main/assets/it/about_licenses.html
app/src/main/assets/pt-rBR/about_licenses.html
app/src/main/assets/ru/about_licenses.html
app/src/main/assets/shared_images/call_to_action.svg [new file with mode: 0644]
app/src/main/assets/tr/about_licenses.html
app/src/main/java/com/stoutner/privacybrowser/activities/AboutActivity.kt
app/src/main/java/com/stoutner/privacybrowser/activities/BookmarksActivity.java
app/src/main/java/com/stoutner/privacybrowser/activities/BookmarksDatabaseViewActivity.java
app/src/main/java/com/stoutner/privacybrowser/activities/DomainsActivity.java
app/src/main/java/com/stoutner/privacybrowser/activities/GuideActivity.java
app/src/main/java/com/stoutner/privacybrowser/activities/ImportExportActivity.java
app/src/main/java/com/stoutner/privacybrowser/activities/LogcatActivity.java
app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java
app/src/main/java/com/stoutner/privacybrowser/activities/RequestsActivity.java
app/src/main/java/com/stoutner/privacybrowser/activities/ViewSourceActivity.kt
app/src/main/java/com/stoutner/privacybrowser/dialogs/ViewSslCertificateDialog.kt
app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java
app/src/main/java/com/stoutner/privacybrowser/helpers/ImportExportDatabaseHelper.java
app/src/main/res/drawable/app_bar_disabled_day.xml
app/src/main/res/drawable/app_bar_disabled_night.xml
app/src/main/res/drawable/app_bar_enabled_day.xml
app/src/main/res/drawable/app_bar_enabled_night.xml
app/src/main/res/drawable/bottom_app_bar_disabled_day.xml [new file with mode: 0644]
app/src/main/res/drawable/bottom_app_bar_disabled_night.xml [new file with mode: 0644]
app/src/main/res/drawable/bottom_app_bar_enabled_day.xml [new file with mode: 0644]
app/src/main/res/drawable/bottom_app_bar_enabled_night.xml [new file with mode: 0644]
app/src/main/res/layout-w900dp/bookmarks_drawer.xml [deleted file]
app/src/main/res/layout-w900dp/bookmarks_drawer_bottom_appbar.xml [new file with mode: 0644]
app/src/main/res/layout-w900dp/bookmarks_drawer_top_appbar.xml [new file with mode: 0644]
app/src/main/res/layout-w900dp/domains_fragments.xml
app/src/main/res/layout/about_coordinatorlayout.xml [deleted file]
app/src/main/res/layout/about_coordinatorlayout_bottom_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/about_coordinatorlayout_top_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/adview.xml [deleted file]
app/src/main/res/layout/adview_bottom_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/adview_top_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/bookmarks_coordinatorlayout.xml [deleted file]
app/src/main/res/layout/bookmarks_coordinatorlayout_bottom_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/bookmarks_coordinatorlayout_top_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/bookmarks_databaseview_coordinatorlayout.xml [deleted file]
app/src/main/res/layout/bookmarks_databaseview_coordinatorlayout_bottom_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/bookmarks_databaseview_coordinatorlayout_top_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/bookmarks_drawer.xml [deleted file]
app/src/main/res/layout/bookmarks_drawer_bottom_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/bookmarks_drawer_top_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/domains_coordinatorlayout.xml [deleted file]
app/src/main/res/layout/domains_coordinatorlayout_bottom_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/domains_coordinatorlayout_top_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/domains_fragments.xml
app/src/main/res/layout/guide_coordinatorlayout.xml [deleted file]
app/src/main/res/layout/guide_coordinatorlayout_bottom_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/guide_coordinatorlayout_top_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/import_export_coordinatorlayout.xml [deleted file]
app/src/main/res/layout/import_export_coordinatorlayout_bottom_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/import_export_coordinatorlayout_top_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/logcat_coordinatorlayout.xml [deleted file]
app/src/main/res/layout/logcat_coordinatorlayout_bottom_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/logcat_coordinatorlayout_top_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/main_framelayout.xml [deleted file]
app/src/main/res/layout/main_framelayout_bottom_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/main_framelayout_top_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/requests_coordinatorlayout.xml [deleted file]
app/src/main/res/layout/requests_coordinatorlayout_bottom_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/requests_coordinatorlayout_top_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/view_source_coordinatorlayout.xml [deleted file]
app/src/main/res/layout/view_source_coordinatorlayout_bottom_appbar.xml [new file with mode: 0644]
app/src/main/res/layout/view_source_coordinatorlayout_top_appbar.xml [new file with mode: 0644]
app/src/main/res/values-fr/strings.xml
app/src/main/res/values-night-v23/styles.xml
app/src/main/res/values-night-v27/styles.xml
app/src/main/res/values-night/styles.xml
app/src/main/res/values-pt-rBR/strings.xml
app/src/main/res/values-v23/styles.xml
app/src/main/res/values-v27/styles.xml
app/src/main/res/values/strings.xml
app/src/main/res/values/styles.xml
app/src/main/res/xml/preferences.xml

index c8173b9e50892515921a42b4259291f500c0753f..ed7caad39eeed54e5a48d9cb88ef11eeebf55ad6 100644 (file)
@@ -1,8 +1,6 @@
 .gradle
 /local.properties
-/.idea/caches
-/.idea/workspace.xml
-/.idea/libraries
+/.idea
 .DS_Store
 /build
 /captures
index d11ce2c767a63b940bac19123529b9b8d16f2df9..5f0c8ec22f3f99a951a97dfe0e0349b8064f824d 100644 (file)
@@ -68,7 +68,7 @@
                                 <PersistentState>
                                   <option name="values">
                                     <map>
-                                      <entry key="url" value="jar:file:/home/soren/Android/android-studio/plugins/android/lib/android.jar!/images/material/icons/materialicons/share/baseline_share_24.xml" />
+                                      <entry key="url" value="jar:file:/home/soren/Android/android-studio/plugins/android/lib/android.jar!/images/material/icons/materialicons/call_to_action/baseline_call_to_action_24.xml" />
                                     </map>
                                   </option>
                                 </PersistentState>
@@ -78,8 +78,7 @@
                         </option>
                         <option name="values">
                           <map>
-                            <entry key="autoMirrored" value="true" />
-                            <entry key="outputName" value="share_day" />
+                            <entry key="outputName" value="bottom_app_bar" />
                             <entry key="sourceFile" value="$USER_HOME$/ownCloud/Android/Privacy Browser/Icons/Icons/link_off_light.svg" />
                           </map>
                         </option>
diff --git a/app/src/free/res/layout/adview.xml b/app/src/free/res/layout/adview.xml
deleted file mode 100644 (file)
index f0e4825..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2016-2017,2019-2021 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<!-- The ad size must be specified below to prevent an error being displayed on first app launch.  <https://redmine.stoutner.com/issues/675> -->
-<com.google.android.gms.ads.AdView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:ads="http://schemas.android.com/apk/res-auto"
-    android:id="@+id/adview"
-    android:layout_height="wrap_content"
-    android:layout_width="match_parent"
-    android:layout_alignParentBottom="true"
-    ads:adUnitId="@string/ad_unit_id"
-    ads:adSize="SMART_BANNER" />
\ No newline at end of file
diff --git a/app/src/free/res/layout/adview_bottom_appbar.xml b/app/src/free/res/layout/adview_bottom_appbar.xml
new file mode 100644 (file)
index 0000000..bd037ad
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2016-2017,2019-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<!-- The ad size must be specified below to prevent an error being displayed on first app launch.  <https://redmine.stoutner.com/issues/675> -->
+<com.google.android.gms.ads.AdView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:ads="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/adview"
+    android:layout_height="wrap_content"
+    android:layout_width="match_parent"
+    android:layout_alignParentTop="true"
+    ads:adUnitId="@string/ad_unit_id"
+    ads:adSize="SMART_BANNER" />
\ No newline at end of file
diff --git a/app/src/free/res/layout/adview_top_appbar.xml b/app/src/free/res/layout/adview_top_appbar.xml
new file mode 100644 (file)
index 0000000..f0e4825
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2016-2017,2019-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<!-- The ad size must be specified below to prevent an error being displayed on first app launch.  <https://redmine.stoutner.com/issues/675> -->
+<com.google.android.gms.ads.AdView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:ads="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/adview"
+    android:layout_height="wrap_content"
+    android:layout_width="match_parent"
+    android:layout_alignParentBottom="true"
+    ads:adUnitId="@string/ad_unit_id"
+    ads:adSize="SMART_BANNER" />
\ No newline at end of file
index d8df339ae35de7108eeb3f2ac4420aa9ea333d90..ae520ff19cf9488c2753c8c87cc1658c8f6eafac 100644 (file)
         <p><svg class="icon"><use href="../shared_images/arrow_forward.svg#icon"/></svg> arrow_forward.</p>
         <p><svg class="icon"><use href="../shared_images/bookmarks.svg#icon"/></svg> bookmarks.</p>
         <p><svg class="icon"><use href="../shared_images/bug_report.svg#icon"/></svg> bug_report.</p>
+        <p><svg class="icon"><use href="../shared_images/call_to_action.svg#icon"/></svg> call_to_action.</p>
         <p><svg class="icon"><use href="../shared_images/camera_enhance.svg#icon"/></svg> camera_enhance.</p>
         <p><svg class="icon"><use href="../shared_images/chrome_reader_mode.svg#icon"/></svg> chrome_reader_mode.</p>
         <p><svg class="icon"><use href="../shared_images/close.svg#icon"/></svg> close.</p>
index 4ee960e2894a3eb06e11ecb538df8730cfebd3ad..10ef8059ef42732a841e94db999037decf79d7b0 100644 (file)
         <p><svg class="icon"><use href="../shared_images/arrow_forward.svg#icon"/></svg> arrow_forward.</p>
         <p><svg class="icon"><use href="../shared_images/bookmarks.svg#icon"/></svg> bookmarks.</p>
         <p><svg class="icon"><use href="../shared_images/bug_report.svg#icon"/></svg> bug_report.</p>
+        <p><svg class="icon"><use href="../shared_images/call_to_action.svg#icon"/></svg> call_to_action.</p>
         <p><svg class="icon"><use href="../shared_images/camera_enhance.svg#icon"/></svg> camera_enhance.</p>
         <p><svg class="icon"><use href="../shared_images/chrome_reader_mode.svg#icon"/></svg> chrome_reader_mode.</p>
         <p><svg class="icon"><use href="../shared_images/close.svg#icon"/></svg> close.</p>
index d8159635cf9374116e46ebf4fbb6b0b1a739d74e..10421f670a61b5112f8027eb8cb4368b7bdb9e85 100644 (file)
         <p><svg class="icon"><use href="../shared_images/arrow_forward.svg#icon"/></svg> arrow_forward.</p>
         <p><svg class="icon"><use href="../shared_images/bookmarks.svg#icon"/></svg> bookmarks.</p>
         <p><svg class="icon"><use href="../shared_images/bug_report.svg#icon"/></svg> bug_report.</p>
+        <p><svg class="icon"><use href="../shared_images/call_to_action.svg#icon"/></svg> call_to_action.</p>
         <p><svg class="icon"><use href="../shared_images/camera_enhance.svg#icon"/></svg> camera_enhance.</p>
         <p><svg class="icon"><use href="../shared_images/chrome_reader_mode.svg#icon"/></svg> chrome_reader_mode.</p>
         <p><svg class="icon"><use href="../shared_images/close.svg#icon"/></svg> close.</p>
index e8f1f866079c25a1dbf3fd9b38193e6d2367030e..23e3d7f903f5a5a75a2ad4cd58161b14b7ddba2a 100644 (file)
         <p><svg class="icon"><use href="../shared_images/arrow_forward.svg#icon"/></svg> arrow_forward.</p>
         <p><svg class="icon"><use href="../shared_images/bookmarks.svg#icon"/></svg> bookmarks.</p>
         <p><svg class="icon"><use href="../shared_images/bug_report.svg#icon"/></svg> bug_report.</p>
+        <p><svg class="icon"><use href="../shared_images/call_to_action.svg#icon"/></svg> call_to_action.</p>
         <p><svg class="icon"><use href="../shared_images/camera_enhance.svg#icon"/></svg> camera_enhance.</p>
         <p><svg class="icon"><use href="../shared_images/chrome_reader_mode.svg#icon"/></svg> chrome_reader_mode.</p>
         <p><svg class="icon"><use href="../shared_images/close.svg#icon"/></svg> close.</p>
index 0e091841ef8a38a44221a7794b3f0ad316865938..0833f9cf0e56821e29156c3bb0776054c0992be4 100644 (file)
@@ -34,9 +34,8 @@
         <p>Il y a quelques années, le W3C (Consortium World Wide Web) a créé un mécanisme permettant aux navigateurs d'informer les serveurs Web qu'ils ne voudraient pas être suivis.
              Ceci est réalisé en incluant un <a href="https://en.wikipedia.org/wiki/Do_Not_Track"> en-tête DNT (Ne pas suivre)</a> avec les requêtes Web.</p>
 
-        <p>L'en-tête DNT ne fournit pas vraiment de confidentialité car la plupart des serveurs Web l'ignorent.
-            Par exemple, Yahoo, Google, Microsoft et Facebook ignorent tous au moins certains en-têtes DNT.
-            Beginning with version 3.8, Privacy Browser no longer has the option to send a DNT header.</p>
+        <p>L'en-tête DNT ne fournit pas vraiment de confidentialité car la plupart des serveurs Web l'ignorent. Par exemple, Yahoo, Google, Microsoft et Facebook ignorent tous au moins certains en-têtes DNT.
+            À partir de la version 3.8, Privacy Browser n'a plus l'option d'envoyer un en-tête DNT.</p>
 
 
         <h3><svg class="header"><use href="../shared_images/link_off.svg#icon"/></svg> Modification d'URLs</h3>
index ea13c25e18d64c4dc6b3086d0afbac24942c8120..2731abc720745b9bb20d853ae18afcc14bed7af6 100644 (file)
         <p><svg class="icon"><use href="../shared_images/arrow_forward.svg#icon"/></svg> arrow_forward.</p>
         <p><svg class="icon"><use href="../shared_images/bookmarks.svg#icon"/></svg> bookmarks.</p>
         <p><svg class="icon"><use href="../shared_images/bug_report.svg#icon"/></svg> bug_report.</p>
+        <p><svg class="icon"><use href="../shared_images/call_to_action.svg#icon"/></svg> call_to_action.</p>
         <p><svg class="icon"><use href="../shared_images/camera_enhance.svg#icon"/></svg> camera_enhance.</p>
         <p><svg class="icon"><use href="../shared_images/chrome_reader_mode.svg#icon"/></svg> chrome_reader_mode.</p>
         <p><svg class="icon"><use href="../shared_images/close.svg#icon"/></svg> close.</p>
index 4ee960e2894a3eb06e11ecb538df8730cfebd3ad..10ef8059ef42732a841e94db999037decf79d7b0 100644 (file)
         <p><svg class="icon"><use href="../shared_images/arrow_forward.svg#icon"/></svg> arrow_forward.</p>
         <p><svg class="icon"><use href="../shared_images/bookmarks.svg#icon"/></svg> bookmarks.</p>
         <p><svg class="icon"><use href="../shared_images/bug_report.svg#icon"/></svg> bug_report.</p>
+        <p><svg class="icon"><use href="../shared_images/call_to_action.svg#icon"/></svg> call_to_action.</p>
         <p><svg class="icon"><use href="../shared_images/camera_enhance.svg#icon"/></svg> camera_enhance.</p>
         <p><svg class="icon"><use href="../shared_images/chrome_reader_mode.svg#icon"/></svg> chrome_reader_mode.</p>
         <p><svg class="icon"><use href="../shared_images/close.svg#icon"/></svg> close.</p>
index 23fa3d5e2de6e2dfe345eb299ccb935768bd31d9..63c5b761756df90d0aa245b99edc0f1eca83b5ed 100644 (file)
         <p><svg class="icon"><use href="../shared_images/arrow_forward.svg#icon"/></svg> arrow_forward.</p>
         <p><svg class="icon"><use href="../shared_images/bookmarks.svg#icon"/></svg> bookmarks.</p>
         <p><svg class="icon"><use href="../shared_images/bug_report.svg#icon"/></svg> bug_report.</p>
+        <p><svg class="icon"><use href="../shared_images/call_to_action.svg#icon"/></svg> call_to_action.</p>
         <p><svg class="icon"><use href="../shared_images/camera_enhance.svg#icon"/></svg> camera_enhance.</p>
         <p><svg class="icon"><use href="../shared_images/chrome_reader_mode.svg#icon"/></svg> chrome_reader_mode.</p>
         <p><svg class="icon"><use href="../shared_images/close.svg#icon"/></svg> close.</p>
diff --git a/app/src/main/assets/shared_images/call_to_action.svg b/app/src/main/assets/shared_images/call_to_action.svg
new file mode 100644 (file)
index 0000000..feb1792
--- /dev/null
@@ -0,0 +1,32 @@
+<!--
+  Copyright © 2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  It is a modified version of `call_to_action`, which is part of the Android Material icon set and is released under the Apache License 2.0.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<svg
+    xmlns="http://www.w3.org/2000/svg"
+    viewBox="0 0 24 24"
+    id="icon" >
+
+  <path
+      d="M0 0h24v24H0V0z"
+      fill="none" />
+
+  <path
+      d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3v-3h18v3z" />
+</svg>
\ No newline at end of file
index 7406a093cb4573405d23d5bfca533c1767f01b6b..b6adf418640d8995e9a6853daf167ae3a7cd3739 100644 (file)
         <p><svg class="icon"><use href="../shared_images/arrow_forward.svg#icon"/></svg> arrow_forward.</p>
         <p><svg class="icon"><use href="../shared_images/bookmarks.svg#icon"/></svg> bookmarks.</p>
         <p><svg class="icon"><use href="../shared_images/bug_report.svg#icon"/></svg> bug_report.</p>
+        <p><svg class="icon"><use href="../shared_images/call_to_action.svg#icon"/></svg> call_to_action.</p>
         <p><svg class="icon"><use href="../shared_images/camera_enhance.svg#icon"/></svg> camera_enhance.</p>
         <p><svg class="icon"><use href="../shared_images/chrome_reader_mode.svg#icon"/></svg> chrome_reader_mode.</p>
         <p><svg class="icon"><use href="../shared_images/close.svg#icon"/></svg> close.</p>
index 94023b37028070ddba86b477e018cc9922602bff..bd5b3b68199096f14181ebb969c4eb9cf094ff9e 100644 (file)
@@ -60,8 +60,9 @@ class AboutActivity : AppCompatActivity(), SaveListener {
         // Get a handle for the shared preferences.
         val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this)
 
-        // Get the screenshot preference.
+        // Get the preferences.
         val allowScreenshots = sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false)
+        val bottomAppBar = sharedPreferences.getBoolean(getString(R.string.bottom_app_bar_key), false)
 
         // Disable screenshots if not allowed.
         if (!allowScreenshots) {
@@ -81,7 +82,11 @@ class AboutActivity : AppCompatActivity(), SaveListener {
         val blocklistVersions = launchingIntent.getStringArrayExtra(BLOCKLIST_VERSIONS)!!
 
         // Set the content view.
-        setContentView(R.layout.about_coordinatorlayout)
+        if (bottomAppBar) {
+            setContentView(R.layout.about_coordinatorlayout_bottom_appbar)
+        } else {
+            setContentView(R.layout.about_coordinatorlayout_top_appbar)
+        }
 
         // Get handles for the views.
         val toolbar = findViewById<Toolbar>(R.id.about_toolbar)
index 2b46600ee6dc319ee819c003f09b5402e9de1265..81f175f8333c5f3590e0ce64137aad0c331f2aef 100644 (file)
@@ -39,6 +39,7 @@ import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.Window;
 import android.view.WindowManager;
 import android.widget.AbsListView;
 import android.widget.CursorAdapter;
@@ -123,8 +124,9 @@ public class BookmarksActivity extends AppCompatActivity implements CreateBookma
         // Get a handle for the shared preferences.
         SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
 
-        // Get the screenshot preference.
-        boolean allowScreenshots = sharedPreferences.getBoolean("allow_screenshots", false);
+        // Get the preferences.
+        boolean allowScreenshots = sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false);
+        boolean bottomAppBar = sharedPreferences.getBoolean(getString(R.string.bottom_app_bar_key), false);
 
         // Disable screenshots if not allowed.
         if (!allowScreenshots) {
@@ -160,11 +162,22 @@ public class BookmarksActivity extends AppCompatActivity implements CreateBookma
         // Convert the favorite icon byte array to a bitmap.
         Bitmap favoriteIconBitmap = BitmapFactory.decodeByteArray(favoriteIconByteArray, 0, favoriteIconByteArray.length);
 
-        // Set the content view.
-        setContentView(R.layout.bookmarks_coordinatorlayout);
+        // Set the content according to the app bar position.
+        if (bottomAppBar) {
+            // Set the content view.
+            setContentView(R.layout.bookmarks_coordinatorlayout_bottom_appbar);
+        } else {
+            // `Window.FEATURE_ACTION_MODE_OVERLAY` makes the contextual action mode cover the support action bar.  It must be requested before the content is set.
+            supportRequestWindowFeature(Window.FEATURE_ACTION_MODE_OVERLAY);
+
+            // Set the content view.
+            setContentView(R.layout.bookmarks_coordinatorlayout_top_appbar);
+        }
 
-        // The AndroidX toolbar must be used until the minimum API is >= 21.
+        // Get a handle for the toolbar.
         final Toolbar toolbar = findViewById(R.id.bookmarks_toolbar);
+
+        // Set the support action bar.
         setSupportActionBar(toolbar);
 
         // Get handles for the views.
@@ -695,6 +708,11 @@ public class BookmarksActivity extends AppCompatActivity implements CreateBookma
                 bookmarksListView.setItemChecked(i, true);
             }
         } else if (menuItemId == R.id.bookmarks_database_view) {
+            // Close the contextual action bar if it is displayed.  This can happen if the bottom app bar is enabled.
+            if (contextualActionMode != null) {
+                contextualActionMode.finish();
+            }
+
             // Create an intent to launch the bookmarks database view activity.
             Intent bookmarksDatabaseViewIntent = new Intent(this, BookmarksDatabaseViewActivity.class);
 
index 6a230c0749a30de78975b372bcc866edeec48bfe..d084d5c68ffc7e977b00850396e74899c3f4d5ae 100644 (file)
@@ -41,6 +41,7 @@ import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.Window;
 import android.view.WindowManager;
 import android.widget.AbsListView;
 import android.widget.AdapterView;
@@ -97,8 +98,9 @@ public class BookmarksDatabaseViewActivity extends AppCompatActivity implements
         // Get a handle for the shared preferences.
         SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
 
-        // Get the screenshot preference.
-        boolean allowScreenshots = sharedPreferences.getBoolean("allow_screenshots", false);
+        // Get the preferences.
+        boolean allowScreenshots = sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false);
+        boolean bottomAppBar = sharedPreferences.getBoolean(getString(R.string.bottom_app_bar_key), false);
 
         // Disable screenshots if not allowed.
         if (!allowScreenshots) {
@@ -123,8 +125,17 @@ public class BookmarksDatabaseViewActivity extends AppCompatActivity implements
         // Convert the favorite icon byte array to a bitmap and store it in a class variable.
         Bitmap favoriteIconBitmap = BitmapFactory.decodeByteArray(favoriteIconByteArray, 0, favoriteIconByteArray.length);
 
-        // Set the content view.
-        setContentView(R.layout.bookmarks_databaseview_coordinatorlayout);
+        // Set the view according to the theme.
+        if (bottomAppBar) {
+            // Set the content view.
+            setContentView(R.layout.bookmarks_databaseview_coordinatorlayout_bottom_appbar);
+        } else {
+            // `Window.FEATURE_ACTION_MODE_OVERLAY` makes the contextual action mode cover the support action bar.  It must be requested before the content is set.
+            supportRequestWindowFeature(Window.FEATURE_ACTION_MODE_OVERLAY);
+
+            // Set the content view.
+            setContentView(R.layout.bookmarks_databaseview_coordinatorlayout_top_appbar);
+        }
 
         // Get a handle for the toolbar.
         Toolbar toolbar = findViewById(R.id.bookmarks_databaseview_toolbar);
index 8d460b0c07dfe69f8c66141b7202a596ce9b37f7..188875b4e8530c5789061abd77ead89ec6296e2f 100644 (file)
@@ -129,8 +129,9 @@ public class DomainsActivity extends AppCompatActivity implements AddDomainDialo
         // Get a handle for the shared preferences.
         SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
 
-        // Get the screenshot preference.
-        boolean allowScreenshots = sharedPreferences.getBoolean("allow_screenshots", false);
+        // Get the preferences.
+        boolean allowScreenshots = sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false);
+        boolean bottomAppBar = sharedPreferences.getBoolean(getString(R.string.bottom_app_bar_key), false);
 
         // Disable screenshots if not allowed.
         if (!allowScreenshots) {
@@ -178,8 +179,12 @@ public class DomainsActivity extends AppCompatActivity implements AddDomainDialo
         sslEndDateLong = intent.getLongExtra("ssl_end_date", 0);
         currentIpAddresses = intent.getStringExtra("current_ip_addresses");
 
-        // Set the content view.
-        setContentView(R.layout.domains_coordinatorlayout);
+        // Set the view.
+        if (bottomAppBar) {
+            setContentView(R.layout.domains_coordinatorlayout_bottom_appbar);
+        } else {
+            setContentView(R.layout.domains_coordinatorlayout_top_appbar);
+        }
 
         // Populate the class variables.
         coordinatorLayout = findViewById(R.id.domains_coordinatorlayout);
index 54c87a87eaa26a6638d2201c73b29d2bf04d7b1c..91ef0fd385b0e9874c46c08528d6d885c24e5423 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2016-2020 Soren Stoutner <soren@stoutner.com>.
+ * Copyright © 2016-2021 Soren Stoutner <soren@stoutner.com>.
  *
  * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
  *
@@ -40,8 +40,9 @@ public class GuideActivity extends AppCompatActivity {
         // Get a handle for the shared preferences.
         SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
 
-        // Get the screenshot preference.
-        boolean allowScreenshots = sharedPreferences.getBoolean("allow_screenshots", false);
+        // Get the preferences.
+        boolean allowScreenshots = sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false);
+        boolean bottomAppBar = sharedPreferences.getBoolean(getString(R.string.bottom_app_bar_key), false);
 
         // Disable screenshots if not allowed.
         if (!allowScreenshots) {
@@ -55,10 +56,16 @@ public class GuideActivity extends AppCompatActivity {
         super.onCreate(savedInstanceState);
 
         // Set the content view.
-        setContentView(R.layout.guide_coordinatorlayout);
+        if (bottomAppBar) {
+            setContentView(R.layout.guide_coordinatorlayout_bottom_appbar);
+        } else {
+            setContentView(R.layout.guide_coordinatorlayout_top_appbar);
+        }
 
-        // The AndroidX toolbar must be used until the minimum API is >= 21.
+        // Get a handle for the toolbar.
         Toolbar toolbar = findViewById(R.id.guide_toolbar);
+
+        // Set the support action bar.
         setSupportActionBar(toolbar);
 
         // Get a handle for the action bar.
index b9acb8c5b420bff373ee7f00dbf50bb46a34f3ad..e3324295d6e8bae171f07e26fb0f46f57be70e76 100644 (file)
@@ -117,8 +117,9 @@ public class ImportExportActivity extends AppCompatActivity {
         // Get a handle for the shared preferences.
         SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
 
-        // Get the screenshot preference.
-        boolean allowScreenshots = sharedPreferences.getBoolean("allow_screenshots", false);
+        // Get the preferences.
+        boolean allowScreenshots = sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false);
+        boolean bottomAppBar = sharedPreferences.getBoolean(getString(R.string.bottom_app_bar_key), false);
 
         // Disable screenshots if not allowed.
         if (!allowScreenshots) {
@@ -132,10 +133,16 @@ public class ImportExportActivity extends AppCompatActivity {
         super.onCreate(savedInstanceState);
 
         // Set the content view.
-        setContentView(R.layout.import_export_coordinatorlayout);
+        if (bottomAppBar) {
+            setContentView(R.layout.import_export_coordinatorlayout_bottom_appbar);
+        } else {
+            setContentView(R.layout.import_export_coordinatorlayout_top_appbar);
+        }
 
-        // Set the support action bar.
+        // Get a handle for the toolbar.
         Toolbar toolbar = findViewById(R.id.import_export_toolbar);
+
+        // Set the support action bar.
         setSupportActionBar(toolbar);
 
         // Get a handle for the action bar.
index 8e54bb43a119d6e16c5d9e425d1d0e2854650f6b..78d203dac4f8b28ec6370294f0f585122db90c6a 100644 (file)
@@ -72,8 +72,9 @@ public class LogcatActivity extends AppCompatActivity implements SaveDialog.Save
         // Get a handle for the shared preferences.
         SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
 
-        // Get the screenshot preference.
+        // Get the preferences.
         boolean allowScreenshots = sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false);
+        boolean bottomAppBar = sharedPreferences.getBoolean(getString(R.string.bottom_app_bar_key), false);
 
         // Disable screenshots if not allowed.
         if (!allowScreenshots) {
@@ -87,7 +88,11 @@ public class LogcatActivity extends AppCompatActivity implements SaveDialog.Save
         super.onCreate(savedInstanceState);
 
         // Set the content view.
-        setContentView(R.layout.logcat_coordinatorlayout);
+        if (bottomAppBar) {
+            setContentView(R.layout.logcat_coordinatorlayout_bottom_appbar);
+        } else {
+            setContentView(R.layout.logcat_coordinatorlayout_top_appbar);
+        }
 
         // Get handles for the views.
         Toolbar toolbar = findViewById(R.id.logcat_toolbar);
index 4861ae3af1d0a43682792784b95d9f80ceb9f739..d08f7c63c625a2c45566061891ad9167b954de7a 100644 (file)
@@ -158,12 +158,16 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.UnsupportedEncodingException;
+
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLDecoder;
 import java.net.URLEncoder;
+
 import java.text.NumberFormat;
+
 import java.util.ArrayList;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -256,6 +260,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
     private boolean downloadWithExternalApp;
     private boolean hideAppBar;
     private boolean scrollAppBar;
+    private boolean bottomAppBar;
     private boolean loadingNewIntent;
     private boolean reapplyDomainSettingsOnRestart;
     private boolean reapplyAppSettingsOnRestart;
@@ -296,6 +301,9 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
     private boolean sanitizeFacebookClickIds;
     private boolean sanitizeTwitterAmpRedirects;
 
+    // Define the class variables.
+    private long lastScrollUpdate = 0;
+
     // Declare the class views.
     private FrameLayout rootFrameLayout;
     private DrawerLayout drawerLayout;
@@ -385,9 +393,10 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
         // Get a handle for the shared preferences.
         SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
 
-        // Get the screenshot preference.
+        // Get the preferences.
         String appTheme = sharedPreferences.getString("app_theme", getString(R.string.app_theme_default_value));
         boolean allowScreenshots = sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false);
+        bottomAppBar = sharedPreferences.getBoolean(getString(R.string.bottom_app_bar_key), false);
 
         // Get the theme entry values string array.
         String[] appThemeEntryValuesStringArray = getResources().getStringArray(R.array.app_theme_entry_values);
@@ -423,7 +432,11 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
         setTheme(R.style.PrivacyBrowser);
 
         // Set the content view.
-        setContentView(R.layout.main_framelayout);
+        if (bottomAppBar) {
+            setContentView(R.layout.main_framelayout_bottom_appbar);
+        } else {
+            setContentView(R.layout.main_framelayout_top_appbar);
+        }
 
         // Get handles for the views.
         rootFrameLayout = findViewById(R.id.root_framelayout);
@@ -3395,7 +3408,19 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
         });
 
         // Implement swipe to refresh.
-        swipeRefreshLayout.setOnRefreshListener(() -> currentWebView.reload());
+        swipeRefreshLayout.setOnRefreshListener(() -> {
+            // Check the visibility of the bottom app bar.  Sometimes it is hidden if the WebView is the same size as the visible screen.
+            if (bottomAppBar && scrollAppBar && (appBarLayout.getVisibility() == View.GONE)) {  // The bottom app bar is currently hidden.
+                // Show the app bar.
+                appBarLayout.setVisibility(View.VISIBLE);
+
+                // Disable the refreshing animation.
+                swipeRefreshLayout.setRefreshing(false);
+            } else {  // A bottom app bar is not currently hidden.
+                // Reload the website.
+                currentWebView.reload();
+            }
+        });
 
         // Store the default progress view offsets for use later in `initializeWebView()`.
         defaultProgressViewStartOffset = swipeRefreshLayout.getProgressViewStartOffset();
@@ -3587,51 +3612,48 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
         // Apply the proxy.
         applyProxy(false);
 
-        // Get the current layout parameters.  Using coordinator layout parameters allows the `setBehavior()` command and using app bar layout parameters allows the `setScrollFlags()` command.
-        CoordinatorLayout.LayoutParams swipeRefreshLayoutParams = (CoordinatorLayout.LayoutParams) swipeRefreshLayout.getLayoutParams();
-        AppBarLayout.LayoutParams toolbarLayoutParams = (AppBarLayout.LayoutParams) toolbar.getLayoutParams();
-        AppBarLayout.LayoutParams findOnPageLayoutParams = (AppBarLayout.LayoutParams) findOnPageLinearLayout.getLayoutParams();
-        AppBarLayout.LayoutParams tabsLayoutParams = (AppBarLayout.LayoutParams) tabsLinearLayout.getLayoutParams();
-
-        // Add the scrolling behavior to the layout parameters.
-        if (scrollAppBar) {
-            // Enable scrolling of the app bar.
-            swipeRefreshLayoutParams.setBehavior(new AppBarLayout.ScrollingViewBehavior());
-            toolbarLayoutParams.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS | AppBarLayout.LayoutParams.SCROLL_FLAG_SNAP);
-            findOnPageLayoutParams.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS | AppBarLayout.LayoutParams.SCROLL_FLAG_SNAP);
-            tabsLayoutParams.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS | AppBarLayout.LayoutParams.SCROLL_FLAG_SNAP);
-        } else {
-            // Disable scrolling of the app bar.
-            swipeRefreshLayoutParams.setBehavior(null);
-            toolbarLayoutParams.setScrollFlags(0);
-            findOnPageLayoutParams.setScrollFlags(0);
-            tabsLayoutParams.setScrollFlags(0);
-
-            // Expand the app bar if it is currently collapsed.
-            appBarLayout.setExpanded(true);
-        }
-
-        // Apply the modified layout parameters.
-        swipeRefreshLayout.setLayoutParams(swipeRefreshLayoutParams);
-        toolbar.setLayoutParams(toolbarLayoutParams);
-        findOnPageLinearLayout.setLayoutParams(findOnPageLayoutParams);
-        tabsLinearLayout.setLayoutParams(tabsLayoutParams);
+        // Adjust the layout and scrolling parameters if the app bar is at the top of the screen.
+        if (!bottomAppBar) {
+            // Get the current layout parameters.  Using coordinator layout parameters allows the `setBehavior()` command and using app bar layout parameters allows the `setScrollFlags()` command.
+            CoordinatorLayout.LayoutParams swipeRefreshLayoutParams = (CoordinatorLayout.LayoutParams) swipeRefreshLayout.getLayoutParams();
+            AppBarLayout.LayoutParams toolbarLayoutParams = (AppBarLayout.LayoutParams) toolbar.getLayoutParams();
+            AppBarLayout.LayoutParams findOnPageLayoutParams = (AppBarLayout.LayoutParams) findOnPageLinearLayout.getLayoutParams();
+            AppBarLayout.LayoutParams tabsLayoutParams = (AppBarLayout.LayoutParams) tabsLinearLayout.getLayoutParams();
+
+            // Add the scrolling behavior to the layout parameters.
+            if (scrollAppBar) {
+                // Enable scrolling of the app bar.
+                swipeRefreshLayoutParams.setBehavior(new AppBarLayout.ScrollingViewBehavior());
+                toolbarLayoutParams.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS | AppBarLayout.LayoutParams.SCROLL_FLAG_SNAP);
+                findOnPageLayoutParams.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS | AppBarLayout.LayoutParams.SCROLL_FLAG_SNAP);
+                tabsLayoutParams.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS | AppBarLayout.LayoutParams.SCROLL_FLAG_SNAP);
+            } else {
+                // Disable scrolling of the app bar.
+                swipeRefreshLayoutParams.setBehavior(null);
+                toolbarLayoutParams.setScrollFlags(0);
+                findOnPageLayoutParams.setScrollFlags(0);
+                tabsLayoutParams.setScrollFlags(0);
+
+                // Expand the app bar if it is currently collapsed.
+                appBarLayout.setExpanded(true);
+            }
 
-        // Set the app bar scrolling for each WebView.
-        for (int i = 0; i < webViewPagerAdapter.getCount(); i++) {
-            // Get the WebView tab fragment.
-            WebViewTabFragment webViewTabFragment = webViewPagerAdapter.getPageFragment(i);
+            // Set the app bar scrolling for each WebView.
+            for (int i = 0; i < webViewPagerAdapter.getCount(); i++) {
+                // Get the WebView tab fragment.
+                WebViewTabFragment webViewTabFragment = webViewPagerAdapter.getPageFragment(i);
 
-            // Get the fragment view.
-            View fragmentView = webViewTabFragment.getView();
+                // Get the fragment view.
+                View fragmentView = webViewTabFragment.getView();
 
-            // Only modify the WebViews if they exist.
-            if (fragmentView != null) {
-                // Get the nested scroll WebView from the tab fragment.
-                NestedScrollWebView nestedScrollWebView = fragmentView.findViewById(R.id.nestedscroll_webview);
+                // Only modify the WebViews if they exist.
+                if (fragmentView != null) {
+                    // Get the nested scroll WebView from the tab fragment.
+                    NestedScrollWebView nestedScrollWebView = fragmentView.findViewById(R.id.nestedscroll_webview);
 
-                // Set the app bar scrolling.
-                nestedScrollWebView.setNestedScrollingEnabled(scrollAppBar);
+                    // Set the app bar scrolling.
+                    nestedScrollWebView.setNestedScrollingEnabled(scrollAppBar);
+                }
             }
         }
 
@@ -5238,19 +5260,22 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                             // Hide the action bar.
                             actionBar.hide();
 
-                            // Check to see if the app bar is normally scrolled.
-                            if (scrollAppBar) {  // The app bar is scrolled when it is displayed.
-                                // Get the swipe refresh layout parameters.
-                                CoordinatorLayout.LayoutParams swipeRefreshLayoutParams = (CoordinatorLayout.LayoutParams) swipeRefreshLayout.getLayoutParams();
-
-                                // Remove the off-screen scrolling layout.
-                                swipeRefreshLayoutParams.setBehavior(null);
-                            } else {  // The app bar is not scrolled when it is displayed.
-                                // Remove the padding from the top of the swipe refresh layout.
-                                swipeRefreshLayout.setPadding(0, 0, 0, 0);
-
-                                // The swipe refresh circle must be moved above the now removed status bar location.
-                                swipeRefreshLayout.setProgressViewOffset(false, -200, defaultProgressViewEndOffset);
+                            // Set layout and scrolling parameters if the app bar is at the top of the screen.
+                            if (!bottomAppBar) {
+                                // Check to see if the app bar is normally scrolled.
+                                if (scrollAppBar) {  // The app bar is scrolled when it is displayed.
+                                    // Get the swipe refresh layout parameters.
+                                    CoordinatorLayout.LayoutParams swipeRefreshLayoutParams = (CoordinatorLayout.LayoutParams) swipeRefreshLayout.getLayoutParams();
+
+                                    // Remove the off-screen scrolling layout.
+                                    swipeRefreshLayoutParams.setBehavior(null);
+                                } else {  // The app bar is not scrolled when it is displayed.
+                                    // Remove the padding from the top of the swipe refresh layout.
+                                    swipeRefreshLayout.setPadding(0, 0, 0, 0);
+
+                                    // The swipe refresh circle must be moved above the now removed status bar location.
+                                    swipeRefreshLayout.setProgressViewOffset(false, -200, defaultProgressViewEndOffset);
+                                }
                             }
                         }
 
@@ -5280,19 +5305,22 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                             // Show the action bar.
                             actionBar.show();
 
-                            // Check to see if the app bar is normally scrolled.
-                            if (scrollAppBar) {  // The app bar is scrolled when it is displayed.
-                                // Get the swipe refresh layout parameters.
-                                CoordinatorLayout.LayoutParams swipeRefreshLayoutParams = (CoordinatorLayout.LayoutParams) swipeRefreshLayout.getLayoutParams();
-
-                                // Add the off-screen scrolling layout.
-                                swipeRefreshLayoutParams.setBehavior(new AppBarLayout.ScrollingViewBehavior());
-                            } else {  // The app bar is not scrolled when it is displayed.
-                                // The swipe refresh layout must be manually moved below the app bar layout.
-                                swipeRefreshLayout.setPadding(0, appBarHeight, 0, 0);
-
-                                // The swipe to refresh circle doesn't always hide itself completely unless it is moved up 10 pixels.
-                                swipeRefreshLayout.setProgressViewOffset(false, defaultProgressViewStartOffset - 10 + appBarHeight, defaultProgressViewEndOffset + appBarHeight);
+                            // Set layout and scrolling parameters if the app bar is at the top of the screen.
+                            if (!bottomAppBar) {
+                                // Check to see if the app bar is normally scrolled.
+                                if (scrollAppBar) {  // The app bar is scrolled when it is displayed.
+                                    // Get the swipe refresh layout parameters.
+                                    CoordinatorLayout.LayoutParams swipeRefreshLayoutParams = (CoordinatorLayout.LayoutParams) swipeRefreshLayout.getLayoutParams();
+
+                                    // Add the off-screen scrolling layout.
+                                    swipeRefreshLayoutParams.setBehavior(new AppBarLayout.ScrollingViewBehavior());
+                                } else {  // The app bar is not scrolled when it is displayed.
+                                    // The swipe refresh layout must be manually moved below the app bar layout.
+                                    swipeRefreshLayout.setPadding(0, appBarHeight, 0, 0);
+
+                                    // The swipe to refresh circle doesn't always hide itself completely unless it is moved up 10 pixels.
+                                    swipeRefreshLayout.setProgressViewOffset(false, defaultProgressViewStartOffset - 10 + appBarHeight, defaultProgressViewEndOffset + appBarHeight);
+                                }
                             }
                         }
 
@@ -5396,7 +5424,8 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
         // Update the status of swipe to refresh based on the scroll position of the nested scroll WebView.  Also reinforce full screen browsing mode.
         // On API < 23, `getViewTreeObserver().addOnScrollChangedListener()` must be used, but it is a little bit buggy and appears to get garbage collected from time to time.
         if (Build.VERSION.SDK_INT >= 23) {
-            nestedScrollWebView.setOnScrollChangeListener((view, i, i1, i2, i3) -> {
+            nestedScrollWebView.setOnScrollChangeListener((view, scrollX, scrollY, oldScrollX, oldScrollY) -> {
+                // Set the swipe to refresh status.
                 if (nestedScrollWebView.getSwipeToRefresh()) {
                     // Only enable swipe to refresh if the WebView is scrolled to the top.
                     swipeRefreshLayout.setEnabled(nestedScrollWebView.getScrollY() == 0);
@@ -5405,6 +5434,18 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                     swipeRefreshLayout.setEnabled(false);
                 }
 
+                //  Set the visibility of the bottom app bar.
+                if (bottomAppBar && scrollAppBar && (Calendar.getInstance().getTimeInMillis() - lastScrollUpdate > 100)) {
+                    if (scrollY - oldScrollY > 25) {  // The WebView was scrolled down.
+                        appBarLayout.setVisibility(View.GONE);
+                    } else if (scrollY - oldScrollY < -25) {  // The WebView was scrolled up.
+                        appBarLayout.setVisibility(View.VISIBLE);
+                    }
+
+                    // Update the last scroll update variable.  This prevents the app bar from flashing on and off at the bottom of the screen.
+                    lastScrollUpdate = Calendar.getInstance().getTimeInMillis();
+                }
+
                 // Reinforce the system UI visibility flags if in full screen browsing mode.
                 // This hides the status and navigation bars, which are displayed if other elements are shown, like dialog boxes, the options menu, or the keyboard.
                 if (inFullScreenBrowsingMode) {
@@ -5428,7 +5469,6 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                     swipeRefreshLayout.setEnabled(false);
                 }
 
-
                 // Reinforce the system UI visibility flags if in full screen browsing mode.
                 // This hides the status and navigation bars, which are displayed if other elements are shown, like dialog boxes, the options menu, or the keyboard.
                 if (inFullScreenBrowsingMode) {
@@ -6060,25 +6100,25 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
 
             @Override
             public void onPageStarted(WebView view, String url, Bitmap favicon) {
-                // Get the preferences.
-                boolean scrollAppBar = sharedPreferences.getBoolean("scroll_app_bar", true);
-
-                // Set the top padding of the swipe refresh layout according to the app bar scrolling preference.  This can't be done in `appAppSettings()` because the app bar is not yet populated there.
-                if (scrollAppBar || (inFullScreenBrowsingMode && hideAppBar)) {
-                    // No padding is needed because it will automatically be placed below the app bar layout due to the scrolling layout behavior.
-                    swipeRefreshLayout.setPadding(0, 0, 0, 0);
-
-                    // The swipe to refresh circle doesn't always hide itself completely unless it is moved up 10 pixels.
-                    swipeRefreshLayout.setProgressViewOffset(false, defaultProgressViewStartOffset - 10, defaultProgressViewEndOffset);
-                } else {
-                    // Get the app bar layout height.  This can't be done in `applyAppSettings()` because the app bar is not yet populated there.
-                    appBarHeight = appBarLayout.getHeight();
-
-                    // The swipe refresh layout must be manually moved below the app bar layout.
-                    swipeRefreshLayout.setPadding(0, appBarHeight, 0, 0);
-
-                    // The swipe to refresh circle doesn't always hide itself completely unless it is moved up 10 pixels.
-                    swipeRefreshLayout.setProgressViewOffset(false, defaultProgressViewStartOffset - 10 + appBarHeight, defaultProgressViewEndOffset + appBarHeight);
+                // Set the padding and layout settings if the app bar is at the top of the screen.
+                if (!bottomAppBar) {
+                    // Set the top padding of the swipe refresh layout according to the app bar scrolling preference.  This can't be done in `appAppSettings()` because the app bar is not yet populated there.
+                    if (scrollAppBar || (inFullScreenBrowsingMode && hideAppBar)) {
+                        // No padding is needed because it will automatically be placed below the app bar layout due to the scrolling layout behavior.
+                        swipeRefreshLayout.setPadding(0, 0, 0, 0);
+
+                        // The swipe to refresh circle doesn't always hide itself completely unless it is moved up 10 pixels.
+                        swipeRefreshLayout.setProgressViewOffset(false, defaultProgressViewStartOffset - 10, defaultProgressViewEndOffset);
+                    } else {
+                        // Get the app bar layout height.  This can't be done in `applyAppSettings()` because the app bar is not yet populated there.
+                        appBarHeight = appBarLayout.getHeight();
+
+                        // The swipe refresh layout must be manually moved below the app bar layout.
+                        swipeRefreshLayout.setPadding(0, appBarHeight, 0, 0);
+
+                        // The swipe to refresh circle doesn't always hide itself completely unless it is moved up 10 pixels.
+                        swipeRefreshLayout.setProgressViewOffset(false, defaultProgressViewStartOffset - 10 + appBarHeight, defaultProgressViewEndOffset + appBarHeight);
+                    }
                 }
 
                 // Reset the list of resource requests.
index dcb9d66c9e432eaefa89642cafe85ba3957ad70a..bcbb9c1af1fd6507be7cf59384fc250368931094 100644 (file)
@@ -64,8 +64,9 @@ public class RequestsActivity extends AppCompatActivity implements ViewRequestDi
         // Get a handle for the shared preferences.
         SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
 
-        // Get the screenshot preference.
-        boolean allowScreenshots = sharedPreferences.getBoolean("allow_screenshots", false);
+        // Get the preferences.
+        boolean allowScreenshots = sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false);
+        boolean bottomAppBar = sharedPreferences.getBoolean(getString(R.string.bottom_app_bar_key), false);
 
         // Disable screenshots if not allowed.
         if (!allowScreenshots) {
@@ -85,7 +86,11 @@ public class RequestsActivity extends AppCompatActivity implements ViewRequestDi
         boolean blockAllThirdPartyRequests = intent.getBooleanExtra("block_all_third_party_requests", false);
 
         // Set the content view.
-        setContentView(R.layout.requests_coordinatorlayout);
+        if (bottomAppBar) {
+            setContentView(R.layout.requests_coordinatorlayout_bottom_appbar);
+        } else {
+            setContentView(R.layout.requests_coordinatorlayout_top_appbar);
+        }
 
         // Use the AndroidX toolbar until the minimum API is >= 21.
         Toolbar toolbar = findViewById(R.id.requests_toolbar);
index eb8ba87cc0a3147738c6c7276eb1e1fb7d10211f..b2d50e7c79e96f56fc15c82a51588d73aadd95ff 100644 (file)
@@ -82,8 +82,9 @@ class ViewSourceActivity: AppCompatActivity(), UntrustedSslCertificateListener {
         // Get a handle for the shared preferences.
         val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(applicationContext)
 
-        // Get the screenshot preference.
+        // Get the preferences.
         val allowScreenshots = sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false)
+        val bottomAppBar = sharedPreferences.getBoolean(getString(R.string.bottom_app_bar_key), false)
 
         // Disable screenshots if not allowed.
         if (!allowScreenshots) {
@@ -104,7 +105,11 @@ class ViewSourceActivity: AppCompatActivity(), UntrustedSslCertificateListener {
         val userAgent = intent.getStringExtra(USER_AGENT)!!
 
         // Set the content view.
-        setContentView(R.layout.view_source_coordinatorlayout)
+        if (bottomAppBar) {
+            setContentView(R.layout.view_source_coordinatorlayout_bottom_appbar)
+        } else {
+            setContentView(R.layout.view_source_coordinatorlayout_top_appbar)
+        }
 
         // Get a handle for the toolbar.
         val toolbar = findViewById<Toolbar>(R.id.view_source_toolbar)
index 3c971dc6bc712f6ca9b05a6ad1eea8acd7eab9e5..b5b0dd275608cb4fb009f5a8c918dba08ebbe445 100644 (file)
@@ -41,6 +41,7 @@ import androidx.preference.PreferenceManager
 import com.stoutner.privacybrowser.R
 import com.stoutner.privacybrowser.activities.MainWebViewActivity
 import com.stoutner.privacybrowser.views.NestedScrollWebView
+
 import java.io.ByteArrayOutputStream
 
 import java.text.DateFormat
index c6a1493e645e96fd094217fae3df80b891d1c139..44617594ba61f9b2c14c640fca070c11952c0629 100644 (file)
@@ -94,6 +94,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
     private Preference swipeToRefreshPreference;
     private Preference downloadWithExternalAppPreference;
     private Preference scrollAppBarPreference;
+    private Preference bottomAppBarPreference;
     private Preference displayAdditionalAppBarIconsPreference;
     private Preference appThemePreference;
     private Preference webViewThemePreference;
@@ -157,6 +158,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
         swipeToRefreshPreference = findPreference("swipe_to_refresh");
         downloadWithExternalAppPreference = findPreference(getString(R.string.download_with_external_app_key));
         scrollAppBarPreference = findPreference("scroll_app_bar");
+        bottomAppBarPreference = findPreference(getString(R.string.bottom_app_bar_key));
         displayAdditionalAppBarIconsPreference = findPreference(getString(R.string.display_additional_app_bar_icons_key));
         appThemePreference = findPreference("app_theme");
         webViewThemePreference = findPreference("webview_theme");
@@ -200,6 +202,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
         assert swipeToRefreshPreference != null;
         assert downloadWithExternalAppPreference != null;
         assert scrollAppBarPreference != null;
+        assert bottomAppBarPreference != null;
         assert displayAdditionalAppBarIconsPreference != null;
         assert appThemePreference != null;
         assert webViewThemePreference != null;
@@ -888,6 +891,21 @@ public class SettingsFragment extends PreferenceFragmentCompat {
             }
         }
 
+        // Set the bottom app bar preference icon.
+        if (sharedPreferences.getBoolean(getString(R.string.bottom_app_bar_key), false)) {
+            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
+                bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_enabled_day);
+            } else {
+                bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_enabled_night);
+            }
+        } else {
+            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
+                bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_disabled_day);
+            } else {
+                bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_disabled_night);
+            }
+        }
+
         // Set the display additional app bar icons preference icon.
         if (sharedPreferences.getBoolean(getString(R.string.display_additional_app_bar_icons_key), false)) {
             if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
@@ -1174,29 +1192,8 @@ public class SettingsFragment extends PreferenceFragmentCompat {
                         }
                     }
 
-                    // Create an intent to restart Privacy Browser.
-                    Intent allowScreenshotsRestartIntent = requireActivity().getParentActivityIntent();
-
-                    // Assert that the intent is not null to remove the lint error below.
-                    assert allowScreenshotsRestartIntent != null;
-
-                    // `Intent.FLAG_ACTIVITY_CLEAR_TASK` removes all activities from the stack.  It requires `Intent.FLAG_ACTIVITY_NEW_TASK`.
-                    allowScreenshotsRestartIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
-
-                    // Create a handler to restart the activity.
-                    Handler allowScreenshotsRestartHandler = new Handler(Looper.getMainLooper());
-
-                    // Create a runnable to restart the activity.
-                    Runnable allowScreenshotsRestartRunnable = () -> {
-                        // Restart the activity.
-                        startActivity(allowScreenshotsRestartIntent);
-
-                        // Kill this instance of Privacy Browser.  Otherwise, the app exhibits sporadic behavior after the restart.
-                        System.exit(0);
-                    };
-
-                    // Restart the activity after 150 milliseconds, so that the app has enough time to save the change to the preference.
-                    allowScreenshotsRestartHandler.postDelayed(allowScreenshotsRestartRunnable, 150);
+                    // Restart Privacy Browser.
+                    restartPrivacyBrowser();
                     break;
 
                 case "easylist":
@@ -1793,6 +1790,26 @@ public class SettingsFragment extends PreferenceFragmentCompat {
                     }
                     break;
 
+                case "bottom_app_bar":
+                    // Update the icon.
+                    if (sharedPreferences.getBoolean(context.getString(R.string.bottom_app_bar_key), false)) {
+                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
+                            bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_enabled_day);
+                        } else {
+                            bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_enabled_night);
+                        }
+                    } else {
+                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
+                            bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_disabled_day);
+                        } else {
+                            bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_disabled_night);
+                        }
+                    }
+
+                    // Restart Privacy Browser.
+                    restartPrivacyBrowser();
+                    break;
+
                 case "display_additional_app_bar_icons":
                     // Update the icon.
                     if (sharedPreferences.getBoolean(context.getString(R.string.display_additional_app_bar_icons_key), false)) {
@@ -1932,4 +1949,30 @@ public class SettingsFragment extends PreferenceFragmentCompat {
             }
         };
     }
+
+    private void restartPrivacyBrowser() {
+        // Create an intent to restart Privacy Browser.
+        Intent restartIntent = requireActivity().getParentActivityIntent();
+
+        // Assert that the intent is not null to remove the lint error below.
+        assert restartIntent != null;
+
+        // `Intent.FLAG_ACTIVITY_CLEAR_TASK` removes all activities from the stack.  It requires `Intent.FLAG_ACTIVITY_NEW_TASK`.
+        restartIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
+
+        // Create a handler to restart the activity.
+        Handler restartHandler = new Handler(Looper.getMainLooper());
+
+        // Create a runnable to restart the activity.
+        Runnable restartRunnable = () -> {
+            // Restart the activity.
+            startActivity(restartIntent);
+
+            // Kill this instance of Privacy Browser.  Otherwise, the app exhibits sporadic behavior after the restart.
+            System.exit(0);
+        };
+
+        // Restart the activity after 200 milliseconds, so that the app has enough time to save the change to the preference.
+        restartHandler.postDelayed(restartRunnable, 200);
+    }
 }
\ No newline at end of file
index 42cd1c7ab3965afb66ab7385e8cbf456f781d411..c8638e08dd4e1eff1599661f16dc4dd55b961c7f 100644 (file)
@@ -82,6 +82,7 @@ public class ImportExportDatabaseHelper {
     private static final String SWIPE_TO_REFRESH = "swipe_to_refresh";
     private static final String DOWNLOAD_WITH_EXTERNAL_APP = "download_with_external_app";
     private static final String SCROLL_APP_BAR = "scroll_app_bar";
+    private static final String BOTTOM_APP_BAR = "bottom_app_bar";
     private static final String DISPLAY_ADDITIONAL_APP_BAR_ICONS = "display_additional_app_bar_icons";
     private static final String APP_THEME = "app_theme";
     private static final String WEBVIEW_THEME = "webview_theme";
@@ -319,7 +320,7 @@ public class ImportExportDatabaseHelper {
                         // Get the current clear logcat value.
                         boolean clearLogcat = sharedPreferences.getBoolean(CLEAR_LOGCAT, true);
 
-                        // Populate the preference table with the current clear logcat value.
+                        // Populate the preferences table with the current clear logcat value.
                         if (clearLogcat) {
                             importDatabase.execSQL("UPDATE " + PREFERENCES_TABLE + " SET " + CLEAR_LOGCAT + " = " + 1);
                         } else {
@@ -346,8 +347,27 @@ public class ImportExportDatabaseHelper {
                         importDatabase.execSQL("UPDATE " + DomainsDatabaseHelper.DOMAINS_TABLE + " SET " + DomainsDatabaseHelper.COOKIES + " = enablefirstpartycookies");
                         importDatabase.execSQL("UPDATE " + PREFERENCES_TABLE + " SET " + COOKIES + " = first_party_cookies");
 
-                        // Create the download with external app column.
+                        // Create the new columns.
                         importDatabase.execSQL("ALTER TABLE " + PREFERENCES_TABLE + " ADD COLUMN " + DOWNLOAD_WITH_EXTERNAL_APP + " BOOLEAN");
+                        importDatabase.execSQL("ALTER TABLE " + PREFERENCES_TABLE + " ADD COLUMN " + BOTTOM_APP_BAR + " BOOLEAN");
+
+                        // Get the current values for the new columns.
+                        boolean downloadWithExternalApp = sharedPreferences.getBoolean(DOWNLOAD_WITH_EXTERNAL_APP, false);
+                        boolean bottomAppBar = sharedPreferences.getBoolean(BOTTOM_APP_BAR, false);
+
+                        // Populate the preferences table with the current download with external app value.
+                        if (downloadWithExternalApp) {
+                            importDatabase.execSQL("UPDATE " + PREFERENCES_TABLE + " SET " + DOWNLOAD_WITH_EXTERNAL_APP + " = " + 1);
+                        } else {
+                            importDatabase.execSQL("UPDATE " + PREFERENCES_TABLE + " SET " + DOWNLOAD_WITH_EXTERNAL_APP + " = " + 0);
+                        }
+
+                        // Populate the preferences table with the current bottom app bar value.
+                        if (bottomAppBar) {
+                            importDatabase.execSQL("UPDATE " + PREFERENCES_TABLE + " SET " + BOTTOM_APP_BAR + " = " + 1);
+                        } else {
+                            importDatabase.execSQL("UPDATE " + PREFERENCES_TABLE + " SET " + BOTTOM_APP_BAR + " = " + 0);
+                        }
                 }
             }
 
@@ -499,6 +519,7 @@ public class ImportExportDatabaseHelper {
                     .putBoolean(SWIPE_TO_REFRESH, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(SWIPE_TO_REFRESH)) == 1)
                     .putBoolean(DOWNLOAD_WITH_EXTERNAL_APP, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(DOWNLOAD_WITH_EXTERNAL_APP)) == 1)
                     .putBoolean(SCROLL_APP_BAR, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(SCROLL_APP_BAR)) == 1)
+                    .putBoolean(BOTTOM_APP_BAR, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(BOTTOM_APP_BAR)) == 1)
                     .putBoolean(DISPLAY_ADDITIONAL_APP_BAR_ICONS, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(DISPLAY_ADDITIONAL_APP_BAR_ICONS)) == 1)
                     .putString(APP_THEME, importPreferencesCursor.getString(importPreferencesCursor.getColumnIndex(APP_THEME)))
                     .putString(WEBVIEW_THEME, importPreferencesCursor.getString(importPreferencesCursor.getColumnIndex(WEBVIEW_THEME)))
@@ -667,6 +688,7 @@ public class ImportExportDatabaseHelper {
                     SWIPE_TO_REFRESH + " BOOLEAN, " +
                     DOWNLOAD_WITH_EXTERNAL_APP + " BOOLEAN, " +
                     SCROLL_APP_BAR + " BOOLEAN, " +
+                    BOTTOM_APP_BAR + " BOOLEAN, " +
                     DISPLAY_ADDITIONAL_APP_BAR_ICONS + " BOOLEAN, " +
                     APP_THEME + " TEXT, " +
                     WEBVIEW_THEME + " TEXT, " +
@@ -717,6 +739,7 @@ public class ImportExportDatabaseHelper {
             preferencesContentValues.put(SWIPE_TO_REFRESH, sharedPreferences.getBoolean(SWIPE_TO_REFRESH, true));
             preferencesContentValues.put(DOWNLOAD_WITH_EXTERNAL_APP, sharedPreferences.getBoolean(DOWNLOAD_WITH_EXTERNAL_APP, false));
             preferencesContentValues.put(SCROLL_APP_BAR, sharedPreferences.getBoolean(SCROLL_APP_BAR, true));
+            preferencesContentValues.put(BOTTOM_APP_BAR, sharedPreferences.getBoolean(BOTTOM_APP_BAR, false));
             preferencesContentValues.put(DISPLAY_ADDITIONAL_APP_BAR_ICONS, sharedPreferences.getBoolean(DISPLAY_ADDITIONAL_APP_BAR_ICONS, false));
             preferencesContentValues.put(APP_THEME, sharedPreferences.getString(APP_THEME, context.getString(R.string.app_theme_default_value)));
             preferencesContentValues.put(WEBVIEW_THEME, sharedPreferences.getString(WEBVIEW_THEME, context.getString(R.string.webview_theme_default_value)));
index 3de4608f7b5c4d5ca439818ae9e67a3e763b154f..52c9ec069dbcf6aeec78a573aad98ddd13bf41d0 100644 (file)
@@ -1,13 +1,13 @@
 <!-- This file comes from the Android Material icon set, where it is called `payment`.  It is released under the Apache License 2.0. -->
 <vector
     xmlns:android="http://schemas.android.com/apk/res/android"
-    android:width="24dp"
     android:height="24dp"
-    android:viewportWidth="24.0"
-    android:viewportHeight="24.0" >
+    android:width="24dp"
+    android:viewportHeight="24.0"
+    android:viewportWidth="24.0" >
 
     <!-- A hard coded color must be used until API >= 21.  Then `@color` or `?attr/colorControlNormal` may be used. -->
     <path
         android:fillColor="#FF757575"
         android:pathData="M20,4L4,4c-1.11,0 -1.99,0.89 -1.99,2L2,18c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2L22,6c0,-1.11 -0.89,-2 -2,-2zM20,18L4,18v-6h16v6zM20,8L4,8L4,6h16v2z" />
-</vector>
+</vector>
\ No newline at end of file
index cfd29e1dc05b450df108423e8e7cb46bc0ff1388..6feeaf837a874b1051db6f24672621a9ccc75f05 100644 (file)
@@ -1,13 +1,13 @@
 <!-- This file comes from the Android Material icon set, where it is called `payment`.  It is released under the Apache License 2.0. -->
 <vector
     xmlns:android="http://schemas.android.com/apk/res/android"
-    android:width="24dp"
     android:height="24dp"
-    android:viewportWidth="24.0"
-    android:viewportHeight="24.0" >
+    android:width="24dp"
+    android:viewportHeight="24.0"
+    android:viewportWidth="24.0" >
 
     <!-- A hard coded color must be used until API >= 21.  Then `@color` or `?attr/colorControlNormal` may be used instead. -->
     <path
         android:fillColor="#FF9E9E9E"
         android:pathData="M20,4L4,4c-1.11,0 -1.99,0.89 -1.99,2L2,18c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2L22,6c0,-1.11 -0.89,-2 -2,-2zM20,18L4,18v-6h16v6zM20,8L4,8L4,6h16v2z" />
-</vector>
+</vector>
\ No newline at end of file
index ae11037d5b567f139564a0ca1d1ea193ac517623..8bdfb69d986246d530a4d629fe3b0f0f50c8d4af 100644 (file)
@@ -10,4 +10,4 @@
     <path
         android:fillColor="#FF1565C0"
         android:pathData="M20,4L4,4c-1.11,0 -1.99,0.89 -1.99,2L2,18c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2L22,6c0,-1.11 -0.89,-2 -2,-2zM20,18L4,18v-6h16v6zM20,8L4,8L4,6h16v2z" />
-</vector>
+</vector>
\ No newline at end of file
index 5eea93c18a0e4cb757b5a214db34f5cc472db23a..0f60fbad95c7538731872711b448a746d95806b7 100644 (file)
@@ -10,4 +10,4 @@
     <path
         android:fillColor="#FF8AB4F8"
         android:pathData="M20,4L4,4c-1.11,0 -1.99,0.89 -1.99,2L2,18c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2L22,6c0,-1.11 -0.89,-2 -2,-2zM20,18L4,18v-6h16v6zM20,8L4,8L4,6h16v2z" />
-</vector>
+</vector>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/bottom_app_bar_disabled_day.xml b/app/src/main/res/drawable/bottom_app_bar_disabled_day.xml
new file mode 100644 (file)
index 0000000..735a435
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- This file comes from the Android Material icon set, where it is called `call_to_action`.  It is released under the Apache License 2.0. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24"
+    android:viewportWidth="24" >
+
+    <!-- A hard coded color must be used until API >= 21.  Then `@color` or `?attr/colorControlNormal` may be used instead. -->
+    <path
+        android:fillColor="#FF757575"
+        android:pathData="M21,3L3,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h18c1.1,0 2,-0.9 2,-2L23,5c0,-1.1 -0.9,-2 -2,-2zM21,19L3,19v-3h18v3z"/>
+</vector>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/bottom_app_bar_disabled_night.xml b/app/src/main/res/drawable/bottom_app_bar_disabled_night.xml
new file mode 100644 (file)
index 0000000..0a891e6
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- This file comes from the Android Material icon set, where it is called `call_to_action`.  It is released under the Apache License 2.0. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24"
+    android:viewportWidth="24" >
+
+    <!-- A hard coded color must be used until API >= 21.  Then `@color` or `?attr/colorControlNormal` may be used instead. -->
+    <path
+        android:fillColor="#FF9E9E9E"
+        android:pathData="M21,3L3,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h18c1.1,0 2,-0.9 2,-2L23,5c0,-1.1 -0.9,-2 -2,-2zM21,19L3,19v-3h18v3z"/>
+</vector>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/bottom_app_bar_enabled_day.xml b/app/src/main/res/drawable/bottom_app_bar_enabled_day.xml
new file mode 100644 (file)
index 0000000..fbe36d3
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- This file comes from the Android Material icon set, where it is called `call_to_action`.  It is released under the Apache License 2.0. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24"
+    android:viewportWidth="24" >
+
+    <!-- A hard coded color must be used until API >= 21.  Then `@color` or `?attr/colorControlNormal` may be used instead. -->
+    <path
+        android:fillColor="#FF1565C0"
+        android:pathData="M21,3L3,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h18c1.1,0 2,-0.9 2,-2L23,5c0,-1.1 -0.9,-2 -2,-2zM21,19L3,19v-3h18v3z"/>
+</vector>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/bottom_app_bar_enabled_night.xml b/app/src/main/res/drawable/bottom_app_bar_enabled_night.xml
new file mode 100644 (file)
index 0000000..5034437
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- This file comes from the Android Material icon set, where it is called `call_to_action`.  It is released under the Apache License 2.0. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24"
+    android:viewportWidth="24" >
+
+    <!-- A hard coded color must be used until API >= 21.  Then `@color` or `?attr/colorControlNormal` may be used instead. -->
+    <path
+        android:fillColor="#FF8AB4F8"
+        android:pathData="M21,3L3,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h18c1.1,0 2,-0.9 2,-2L23,5c0,-1.1 -0.9,-2 -2,-2zM21,19L3,19v-3h18v3z"/>
+</vector>
\ No newline at end of file
diff --git a/app/src/main/res/layout-w900dp/bookmarks_drawer.xml b/app/src/main/res/layout-w900dp/bookmarks_drawer.xml
deleted file mode 100644 (file)
index 03c30f3..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2017,2019-2020 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<!-- `android:layout_width="400dp"` keeps the bookmarks drawer from filling the whole screen on a tablet. -->
-<FrameLayout
-    android:id="@+id/bookmarks_framelayout"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_height="match_parent"
-    android:layout_width="400dp"
-    android:layout_gravity="end" >
-
-    <LinearLayout
-        android:layout_height="match_parent"
-        android:layout_width="match_parent"
-        android:orientation="vertical"
-        android:background="?android:attr/colorBackground" >
-
-        <!-- A compound drawable doesn't work well because only the image view should execute the `onClick()`. -->
-        <LinearLayout
-            android:id="@+id/bookmarks_header_linearlayout"
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:orientation="horizontal"
-            tools:ignore="UseCompoundDrawables" >
-
-            <ImageView
-                android:layout_height="match_parent"
-                android:layout_width="wrap_content"
-                android:layout_gravity="center_vertical"
-                android:paddingStart="15dp"
-                android:paddingEnd="15dp"
-                android:src="@drawable/back"
-                android:background="?attr/selectableItemBackground"
-                android:onClick="bookmarksBack"
-                android:contentDescription="@string/back"
-                app:tint="?android:attr/textColorPrimary" />
-
-            <TextView
-                android:id="@+id/bookmarks_title_textview"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                android:textStyle="bold"
-                android:textSize="20sp"
-                android:textColor="?android:attr/textColorPrimary"
-                android:layout_margin="10dp" />
-        </LinearLayout>
-
-        <ListView
-            android:id="@+id/bookmarks_drawer_listview"
-            android:layout_height="0dp"
-            android:layout_width="match_parent"
-            android:layout_weight="1"
-            android:divider="@color/transparent"
-            android:dividerHeight="0dp" />
-    </LinearLayout>
-
-    <com.google.android.material.floatingactionbutton.FloatingActionButton
-        android:id="@+id/launch_bookmarks_activity_fab"
-        android:layout_height="wrap_content"
-        android:layout_width="wrap_content"
-        android:layout_gravity="bottom|end"
-        android:layout_marginEnd="16dp"
-        android:layout_marginBottom="155dp"
-        android:src="@drawable/bookmarks_day"
-        android:tint="?attr/fabIconTintColor"
-        android:contentDescription="@string/bookmarks" />
-
-    <com.google.android.material.floatingactionbutton.FloatingActionButton
-        android:id="@+id/create_bookmark_folder_fab"
-        android:layout_height="wrap_content"
-        android:layout_width="wrap_content"
-        android:layout_gravity="bottom|end"
-        android:layout_marginEnd="16dp"
-        android:layout_marginBottom="85dp"
-        android:src="@drawable/create_folder"
-        android:tint="?attr/fabIconTintColor"
-        android:contentDescription="@string/create_folder" />
-
-    <com.google.android.material.floatingactionbutton.FloatingActionButton
-        android:id="@+id/create_bookmark_fab"
-        android:layout_height="wrap_content"
-        android:layout_width="wrap_content"
-        android:layout_gravity="bottom|end"
-        android:layout_margin="16dp"
-        android:src="@drawable/create_bookmark"
-        android:tint="?attr/fabIconTintColor"
-        android:contentDescription="@string/create_bookmark" />
-</FrameLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout-w900dp/bookmarks_drawer_bottom_appbar.xml b/app/src/main/res/layout-w900dp/bookmarks_drawer_bottom_appbar.xml
new file mode 100644 (file)
index 0000000..89e5167
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2017,2019-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<!-- `android:layout_width="400dp"` keeps the bookmarks drawer from filling the whole screen on a tablet. -->
+<FrameLayout
+    android:id="@+id/bookmarks_framelayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_height="match_parent"
+    android:layout_width="400dp"
+    android:layout_gravity="end" >
+
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical"
+        android:background="?android:attr/colorBackground" >
+
+        <ListView
+            android:id="@+id/bookmarks_drawer_listview"
+            android:layout_height="0dp"
+            android:layout_width="match_parent"
+            android:layout_weight="1"
+            android:divider="@color/transparent"
+            android:dividerHeight="0dp" />
+
+        <!-- A compound drawable doesn't work well because only the image view should execute the `onClick()`. -->
+        <LinearLayout
+            android:id="@+id/bookmarks_header_linearlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:orientation="horizontal"
+            tools:ignore="UseCompoundDrawables" >
+
+            <ImageView
+                android:layout_height="match_parent"
+                android:layout_width="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:paddingStart="15dp"
+                android:paddingEnd="15dp"
+                android:src="@drawable/back"
+                android:background="?attr/selectableItemBackground"
+                android:onClick="bookmarksBack"
+                android:contentDescription="@string/back"
+                app:tint="?android:attr/textColorPrimary" />
+
+            <TextView
+                android:id="@+id/bookmarks_title_textview"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                android:textStyle="bold"
+                android:textSize="20sp"
+                android:textColor="?android:attr/textColorPrimary"
+                android:layout_margin="10dp" />
+        </LinearLayout>
+    </LinearLayout>
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/launch_bookmarks_activity_fab"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_marginEnd="16dp"
+        android:layout_marginBottom="155dp"
+        android:src="@drawable/bookmarks_day"
+        android:tint="?attr/fabIconTintColor"
+        android:contentDescription="@string/bookmarks" />
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/create_bookmark_folder_fab"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_marginEnd="16dp"
+        android:layout_marginBottom="85dp"
+        android:src="@drawable/create_folder"
+        android:tint="?attr/fabIconTintColor"
+        android:contentDescription="@string/create_folder" />
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/create_bookmark_fab"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_margin="16dp"
+        android:src="@drawable/create_bookmark"
+        android:tint="?attr/fabIconTintColor"
+        android:contentDescription="@string/create_bookmark" />
+</FrameLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout-w900dp/bookmarks_drawer_top_appbar.xml b/app/src/main/res/layout-w900dp/bookmarks_drawer_top_appbar.xml
new file mode 100644 (file)
index 0000000..03c30f3
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2017,2019-2020 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<!-- `android:layout_width="400dp"` keeps the bookmarks drawer from filling the whole screen on a tablet. -->
+<FrameLayout
+    android:id="@+id/bookmarks_framelayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_height="match_parent"
+    android:layout_width="400dp"
+    android:layout_gravity="end" >
+
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical"
+        android:background="?android:attr/colorBackground" >
+
+        <!-- A compound drawable doesn't work well because only the image view should execute the `onClick()`. -->
+        <LinearLayout
+            android:id="@+id/bookmarks_header_linearlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:orientation="horizontal"
+            tools:ignore="UseCompoundDrawables" >
+
+            <ImageView
+                android:layout_height="match_parent"
+                android:layout_width="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:paddingStart="15dp"
+                android:paddingEnd="15dp"
+                android:src="@drawable/back"
+                android:background="?attr/selectableItemBackground"
+                android:onClick="bookmarksBack"
+                android:contentDescription="@string/back"
+                app:tint="?android:attr/textColorPrimary" />
+
+            <TextView
+                android:id="@+id/bookmarks_title_textview"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                android:textStyle="bold"
+                android:textSize="20sp"
+                android:textColor="?android:attr/textColorPrimary"
+                android:layout_margin="10dp" />
+        </LinearLayout>
+
+        <ListView
+            android:id="@+id/bookmarks_drawer_listview"
+            android:layout_height="0dp"
+            android:layout_width="match_parent"
+            android:layout_weight="1"
+            android:divider="@color/transparent"
+            android:dividerHeight="0dp" />
+    </LinearLayout>
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/launch_bookmarks_activity_fab"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_marginEnd="16dp"
+        android:layout_marginBottom="155dp"
+        android:src="@drawable/bookmarks_day"
+        android:tint="?attr/fabIconTintColor"
+        android:contentDescription="@string/bookmarks" />
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/create_bookmark_folder_fab"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_marginEnd="16dp"
+        android:layout_marginBottom="85dp"
+        android:src="@drawable/create_folder"
+        android:tint="?attr/fabIconTintColor"
+        android:contentDescription="@string/create_folder" />
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/create_bookmark_fab"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_margin="16dp"
+        android:src="@drawable/create_bookmark"
+        android:tint="?attr/fabIconTintColor"
+        android:contentDescription="@string/create_bookmark" />
+</FrameLayout>
\ No newline at end of file
index 15a55f43d89cf9552b219b2f3451c502a56b82f8..37a0d5fd18dcc3ee729d7bd436414d955ffab2fa 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  Copyright © 2017 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2017,2021 Soren Stoutner <soren@stoutner.com>.
 
   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
 
   You should have received a copy of the GNU General Public License
   along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
 
-<!-- `android:baselineAligned="False"` reduces unneeded computational overhead with `RecyclerViews`. -->
+<!-- `android:baselineAligned="False"` reduces unneeded computational overhead with the linear layout. -->
 <LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     tools:context=".activities.DomainsActivity"
+    android:layout_height="0dp"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
+    android:layout_weight="1"
     android:orientation="horizontal"
     android:baselineAligned="false"
     android:divider="?android:attr/dividerHorizontal"
diff --git a/app/src/main/res/layout/about_coordinatorlayout.xml b/app/src/main/res/layout/about_coordinatorlayout.xml
deleted file mode 100644 (file)
index c4dce55..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2016-2017,2019-2020 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<androidx.coordinatorlayout.widget.CoordinatorLayout
-    android:id="@+id/about_coordinatorlayout"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:layout_height="match_parent"
-    android:layout_width="match_parent" >
-
-    <!-- The linear layout with `orientation="vertical"` moves the view pager below the app bar layout. -->
-    <LinearLayout
-        android:layout_height="match_parent"
-        android:layout_width="match_parent"
-        android:orientation="vertical" >
-
-        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
-        <com.google.android.material.appbar.AppBarLayout
-            android:id="@+id/about_appbarlayout"
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:background="?android:attr/colorBackground"
-            android:theme="@style/PrivacyBrowserAppBar" >
-
-            <androidx.appcompat.widget.Toolbar
-                android:id="@+id/about_toolbar"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent" />
-
-            <com.google.android.material.tabs.TabLayout
-                android:id="@+id/about_tablayout"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                app:tabMode="scrollable" />
-        </com.google.android.material.appbar.AppBarLayout>
-
-        <!-- `android:layout_weight="1"` makes the view pager fill the rest of the screen. -->
-        <androidx.viewpager.widget.ViewPager
-            android:id="@+id/about_viewpager"
-            android:layout_height="0dp"
-            android:layout_width="match_parent"
-            android:layout_weight="1" />
-    </LinearLayout>
-</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/about_coordinatorlayout_bottom_appbar.xml b/app/src/main/res/layout/about_coordinatorlayout_bottom_appbar.xml
new file mode 100644 (file)
index 0000000..9d7b1d5
--- /dev/null
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2016-2017,2019-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+    android:id="@+id/about_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent" >
+
+    <!-- The linear layout with `orientation="vertical"` keeps the view pager above the app bar layout.
+       `app:layout_dodgeInsetEdges="bottom"` as a child of a coordinator layout moves the view above snackbars. -->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical"
+        app:layout_dodgeInsetEdges="bottom" >
+
+        <!-- `android:layout_weight="1"` makes the view pager fill the rest of the screen. -->
+        <androidx.viewpager.widget.ViewPager
+            android:id="@+id/about_viewpager"
+            android:layout_height="0dp"
+            android:layout_width="match_parent"
+            android:layout_weight="1" />
+
+        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
+        <com.google.android.material.appbar.AppBarLayout
+            android:id="@+id/about_appbarlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:background="?android:attr/colorBackground"
+            android:theme="@style/PrivacyBrowserAppBar" >
+
+            <com.google.android.material.tabs.TabLayout
+                android:id="@+id/about_tablayout"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                app:tabMode="scrollable" />
+
+            <androidx.appcompat.widget.Toolbar
+                android:id="@+id/about_toolbar"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" />
+        </com.google.android.material.appbar.AppBarLayout>
+    </LinearLayout>
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/about_coordinatorlayout_top_appbar.xml b/app/src/main/res/layout/about_coordinatorlayout_top_appbar.xml
new file mode 100644 (file)
index 0000000..c4dce55
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2016-2017,2019-2020 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+    android:id="@+id/about_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent" >
+
+    <!-- The linear layout with `orientation="vertical"` moves the view pager below the app bar layout. -->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical" >
+
+        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
+        <com.google.android.material.appbar.AppBarLayout
+            android:id="@+id/about_appbarlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:background="?android:attr/colorBackground"
+            android:theme="@style/PrivacyBrowserAppBar" >
+
+            <androidx.appcompat.widget.Toolbar
+                android:id="@+id/about_toolbar"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" />
+
+            <com.google.android.material.tabs.TabLayout
+                android:id="@+id/about_tablayout"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                app:tabMode="scrollable" />
+        </com.google.android.material.appbar.AppBarLayout>
+
+        <!-- `android:layout_weight="1"` makes the view pager fill the rest of the screen. -->
+        <androidx.viewpager.widget.ViewPager
+            android:id="@+id/about_viewpager"
+            android:layout_height="0dp"
+            android:layout_width="match_parent"
+            android:layout_weight="1" />
+    </LinearLayout>
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/adview.xml b/app/src/main/res/layout/adview.xml
deleted file mode 100644 (file)
index 9230b60..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2016-2017,2019 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<!-- This text view has an id of `adView` so that the ad commands (which do nothing in the standard flavor) don't produce errors. -->
-<TextView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/adview"
-    android:layout_height="wrap_content"
-    android:layout_width="wrap_content"
-    android:visibility="gone" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/adview_bottom_appbar.xml b/app/src/main/res/layout/adview_bottom_appbar.xml
new file mode 100644 (file)
index 0000000..9230b60
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2016-2017,2019 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<!-- This text view has an id of `adView` so that the ad commands (which do nothing in the standard flavor) don't produce errors. -->
+<TextView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/adview"
+    android:layout_height="wrap_content"
+    android:layout_width="wrap_content"
+    android:visibility="gone" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/adview_top_appbar.xml b/app/src/main/res/layout/adview_top_appbar.xml
new file mode 100644 (file)
index 0000000..9230b60
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2016-2017,2019 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<!-- This text view has an id of `adView` so that the ad commands (which do nothing in the standard flavor) don't produce errors. -->
+<TextView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/adview"
+    android:layout_height="wrap_content"
+    android:layout_width="wrap_content"
+    android:visibility="gone" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/bookmarks_coordinatorlayout.xml b/app/src/main/res/layout/bookmarks_coordinatorlayout.xml
deleted file mode 100644 (file)
index 555e185..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2016-2020 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<androidx.coordinatorlayout.widget.CoordinatorLayout
-    android:id="@+id/bookmarks_coordinatorlayout"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_height="match_parent"
-    android:layout_width="match_parent" >
-
-    <!-- The linear layout with `orientation="vertical"` moves the content below the app bar layout. -->
-    <LinearLayout
-        android:layout_height="match_parent"
-        android:layout_width="match_parent"
-        android:orientation="vertical" >
-
-        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
-        <com.google.android.material.appbar.AppBarLayout
-            android:id="@+id/bookmarks_appbarlayout"
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:background="?android:attr/colorBackground"
-            android:theme="@style/PrivacyBrowserAppBar" >
-
-            <androidx.appcompat.widget.Toolbar
-                android:id="@+id/bookmarks_toolbar"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent" />
-        </com.google.android.material.appbar.AppBarLayout>
-
-        <!-- `android:choiceMode="multipleChoiceModal"` allows the contextual action menu to select more than one item at a time.
-            `android:dividerHeight` must be at least `1dp` or the list view is inconsistent in calculating how many bookmarks are displayed. -->
-        <ListView
-            android:id="@+id/bookmarks_listview"
-            android:layout_height="match_parent"
-            android:layout_width="match_parent"
-            android:choiceMode="multipleChoiceModal"
-            android:divider="@color/transparent"
-            android:dividerHeight="1dp" />
-    </LinearLayout>
-
-    <com.google.android.material.floatingactionbutton.FloatingActionButton
-        android:id="@+id/create_bookmark_folder_fab"
-        android:layout_height="wrap_content"
-        android:layout_width="wrap_content"
-        android:layout_gravity="bottom|end"
-        android:layout_marginEnd="16dp"
-        android:layout_marginBottom="85dp"
-        android:src="@drawable/create_folder"
-        android:tint="?attr/fabIconTintColor" />
-
-    <com.google.android.material.floatingactionbutton.FloatingActionButton
-        android:id="@+id/create_bookmark_fab"
-        android:layout_height="wrap_content"
-        android:layout_width="wrap_content"
-        android:layout_gravity="bottom|end"
-        android:layout_margin="16dp"
-        android:src="@drawable/create_bookmark"
-        android:tint="?attr/fabIconTintColor" />
-</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/bookmarks_coordinatorlayout_bottom_appbar.xml b/app/src/main/res/layout/bookmarks_coordinatorlayout_bottom_appbar.xml
new file mode 100644 (file)
index 0000000..4863376
--- /dev/null
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2016-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+    android:id="@+id/bookmarks_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent" >
+
+    <!-- The linear layout with `orientation="vertical"` keeps the content above the app bar layout.  `app:layout_dodgeInsetEdges="bottom"` as a child of a coordinator layout moves the view above snackbars. -->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical"
+        app:layout_dodgeInsetEdges="bottom" >
+
+        <!-- `android:choiceMode="multipleChoiceModal"` allows the contextual action menu to select more than one item at a time.
+            `android:dividerHeight` must be at least `1dp` or the list view is inconsistent in calculating how many bookmarks are displayed. -->
+        <ListView
+            android:id="@+id/bookmarks_listview"
+            android:layout_height="0dp"
+            android:layout_width="match_parent"
+            android:layout_weight="1"
+            android:choiceMode="multipleChoiceModal"
+            android:divider="@color/transparent"
+            android:dividerHeight="1dp" />
+
+        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
+        <com.google.android.material.appbar.AppBarLayout
+            android:id="@+id/bookmarks_appbarlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:background="?android:attr/colorBackground"
+            android:theme="@style/PrivacyBrowserAppBar" >
+
+            <androidx.appcompat.widget.Toolbar
+                android:id="@+id/bookmarks_toolbar"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" />
+        </com.google.android.material.appbar.AppBarLayout>
+    </LinearLayout>
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/create_bookmark_folder_fab"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_marginEnd="16dp"
+        android:layout_marginBottom="140dp"
+        android:src="@drawable/create_folder"
+        android:tint="?attr/fabIconTintColor"
+        android:contentDescription="@string/create_folder" />
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/create_bookmark_fab"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_marginEnd="16dp"
+        android:layout_marginBottom="70dp"
+        android:src="@drawable/create_bookmark"
+        android:tint="?attr/fabIconTintColor"
+        android:contentDescription="@string/create_bookmark" />
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/bookmarks_coordinatorlayout_top_appbar.xml b/app/src/main/res/layout/bookmarks_coordinatorlayout_top_appbar.xml
new file mode 100644 (file)
index 0000000..e5ac971
--- /dev/null
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2016-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+    android:id="@+id/bookmarks_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent" >
+
+    <!-- The linear layout with `orientation="vertical"` moves the content below the app bar layout. -->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical" >
+
+        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
+        <com.google.android.material.appbar.AppBarLayout
+            android:id="@+id/bookmarks_appbarlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:background="?android:attr/colorBackground"
+            android:theme="@style/PrivacyBrowserAppBar" >
+
+            <androidx.appcompat.widget.Toolbar
+                android:id="@+id/bookmarks_toolbar"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" />
+        </com.google.android.material.appbar.AppBarLayout>
+
+        <!-- `android:choiceMode="multipleChoiceModal"` allows the contextual action menu to select more than one item at a time.
+            `android:dividerHeight` must be at least `1dp` or the list view is inconsistent in calculating how many bookmarks are displayed. -->
+        <ListView
+            android:id="@+id/bookmarks_listview"
+            android:layout_height="match_parent"
+            android:layout_width="match_parent"
+            android:choiceMode="multipleChoiceModal"
+            android:divider="@color/transparent"
+            android:dividerHeight="1dp" />
+    </LinearLayout>
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/create_bookmark_folder_fab"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_marginEnd="16dp"
+        android:layout_marginBottom="85dp"
+        android:src="@drawable/create_folder"
+        android:tint="?attr/fabIconTintColor"
+        android:contentDescription="@string/create_folder" />
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/create_bookmark_fab"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_margin="16dp"
+        android:src="@drawable/create_bookmark"
+        android:tint="?attr/fabIconTintColor"
+        android:contentDescription="@string/create_bookmark" />
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/bookmarks_databaseview_coordinatorlayout.xml b/app/src/main/res/layout/bookmarks_databaseview_coordinatorlayout.xml
deleted file mode 100644 (file)
index f6474bb..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2016-2020 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<androidx.coordinatorlayout.widget.CoordinatorLayout
-    android:id="@+id/bookmarks_databaseview_coordinatorlayout"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_height="match_parent"
-    android:layout_width="match_parent" >
-
-    <!-- The linear layout with `orientation="vertical"` moves the list view below the app bar layout. -->
-    <LinearLayout
-        android:layout_height="match_parent"
-        android:layout_width="match_parent"
-        android:orientation="vertical" >
-
-        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
-        <com.google.android.material.appbar.AppBarLayout
-            android:id="@+id/bookmarks_databaseview_appbarlayout"
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:background="?android:attr/colorBackground"
-            android:theme="@style/PrivacyBrowserAppBar" >
-
-            <androidx.appcompat.widget.Toolbar
-                android:id="@+id/bookmarks_databaseview_toolbar"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent" />
-        </com.google.android.material.appbar.AppBarLayout>
-
-        <!-- `android:choiceMode="multipleChoiceModal"` allows the contextual action menu to select more than one item at a time. -->
-        <ListView
-            android:id="@+id/bookmarks_databaseview_listview"
-            android:layout_height="match_parent"
-            android:layout_width="match_parent"
-            android:choiceMode="multipleChoiceModal" />
-    </LinearLayout>
-</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/bookmarks_databaseview_coordinatorlayout_bottom_appbar.xml b/app/src/main/res/layout/bookmarks_databaseview_coordinatorlayout_bottom_appbar.xml
new file mode 100644 (file)
index 0000000..42b4c50
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2016-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+    android:id="@+id/bookmarks_databaseview_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent" >
+
+    <!-- The linear layout with `orientation="vertical"` keeps the list view above the app bar layout.
+        `app:layout_dodgeInsetEdges="bottom"` as a child of a coordinator layout moves the view above snackbars.-->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical"
+        app:layout_dodgeInsetEdges="bottom" >
+
+        <!-- `android:choiceMode="multipleChoiceModal"` allows the contextual action menu to select more than one item at a time. -->
+        <ListView
+            android:id="@+id/bookmarks_databaseview_listview"
+            android:layout_height="0dp"
+            android:layout_width="match_parent"
+            android:layout_weight="1"
+            android:choiceMode="multipleChoiceModal" />
+
+        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
+        <com.google.android.material.appbar.AppBarLayout
+            android:id="@+id/bookmarks_databaseview_appbarlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:background="?android:attr/colorBackground"
+            android:theme="@style/PrivacyBrowserAppBar" >
+
+            <androidx.appcompat.widget.Toolbar
+                android:id="@+id/bookmarks_databaseview_toolbar"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" />
+        </com.google.android.material.appbar.AppBarLayout>
+    </LinearLayout>
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/bookmarks_databaseview_coordinatorlayout_top_appbar.xml b/app/src/main/res/layout/bookmarks_databaseview_coordinatorlayout_top_appbar.xml
new file mode 100644 (file)
index 0000000..f6474bb
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2016-2020 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+    android:id="@+id/bookmarks_databaseview_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent" >
+
+    <!-- The linear layout with `orientation="vertical"` moves the list view below the app bar layout. -->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical" >
+
+        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
+        <com.google.android.material.appbar.AppBarLayout
+            android:id="@+id/bookmarks_databaseview_appbarlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:background="?android:attr/colorBackground"
+            android:theme="@style/PrivacyBrowserAppBar" >
+
+            <androidx.appcompat.widget.Toolbar
+                android:id="@+id/bookmarks_databaseview_toolbar"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" />
+        </com.google.android.material.appbar.AppBarLayout>
+
+        <!-- `android:choiceMode="multipleChoiceModal"` allows the contextual action menu to select more than one item at a time. -->
+        <ListView
+            android:id="@+id/bookmarks_databaseview_listview"
+            android:layout_height="match_parent"
+            android:layout_width="match_parent"
+            android:choiceMode="multipleChoiceModal" />
+    </LinearLayout>
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/bookmarks_drawer.xml b/app/src/main/res/layout/bookmarks_drawer.xml
deleted file mode 100644 (file)
index 4ebce6d..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2017-2020 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<FrameLayout
-    android:id="@+id/bookmarks_framelayout"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_height="match_parent"
-    android:layout_width="match_parent"
-    android:layout_gravity="end">
-
-    <LinearLayout
-        android:layout_height="match_parent"
-        android:layout_width="match_parent"
-        android:orientation="vertical"
-        android:background="?android:attr/colorBackground" >
-
-        <!-- A compound drawable doesn't work well because only the image view should execute the `onClick()`. -->
-        <LinearLayout
-            android:id="@+id/bookmarks_header_linearlayout"
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:orientation="horizontal"
-            tools:ignore="UseCompoundDrawables" >
-
-            <ImageView
-                android:layout_height="match_parent"
-                android:layout_width="wrap_content"
-                android:layout_gravity="center_vertical"
-                android:paddingStart="15dp"
-                android:paddingEnd="15dp"
-                android:src="@drawable/back"
-                android:background="?attr/selectableItemBackground"
-                android:onClick="bookmarksBack"
-                android:contentDescription="@string/back"
-                app:tint="?android:attr/textColorPrimary" />
-
-            <TextView
-                android:id="@+id/bookmarks_title_textview"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                android:textStyle="bold"
-                android:textSize="20sp"
-                android:textColor="?android:attr/textColorPrimary"
-                android:layout_margin="10dp" />
-        </LinearLayout>
-
-        <ListView
-            android:id="@+id/bookmarks_drawer_listview"
-            android:layout_height="0dp"
-            android:layout_width="match_parent"
-            android:layout_weight="1"
-            android:divider="@color/transparent"
-            android:dividerHeight="0dp" />
-    </LinearLayout>
-
-    <com.google.android.material.floatingactionbutton.FloatingActionButton
-        android:id="@+id/launch_bookmarks_activity_fab"
-        android:layout_height="wrap_content"
-        android:layout_width="wrap_content"
-        android:layout_gravity="bottom|end"
-        android:layout_marginEnd="16dp"
-        android:layout_marginBottom="155dp"
-        android:src="@drawable/bookmarks_day"
-        android:tint="?attr/fabIconTintColor"
-        android:contentDescription="@string/bookmarks" />
-
-    <com.google.android.material.floatingactionbutton.FloatingActionButton
-        android:id="@+id/create_bookmark_folder_fab"
-        android:layout_height="wrap_content"
-        android:layout_width="wrap_content"
-        android:layout_gravity="bottom|end"
-        android:layout_marginEnd="16dp"
-        android:layout_marginBottom="85dp"
-        android:src="@drawable/create_folder"
-        android:tint="?attr/fabIconTintColor"
-        android:contentDescription="@string/create_folder" />
-
-    <com.google.android.material.floatingactionbutton.FloatingActionButton
-        android:id="@+id/create_bookmark_fab"
-        android:layout_height="wrap_content"
-        android:layout_width="wrap_content"
-        android:layout_gravity="bottom|end"
-        android:layout_margin="16dp"
-        android:src="@drawable/create_bookmark"
-        android:tint="?attr/fabIconTintColor"
-        android:contentDescription="@string/create_bookmark" />
-</FrameLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/bookmarks_drawer_bottom_appbar.xml b/app/src/main/res/layout/bookmarks_drawer_bottom_appbar.xml
new file mode 100644 (file)
index 0000000..1d11be0
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2017-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<FrameLayout
+    android:id="@+id/bookmarks_framelayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent"
+    android:layout_gravity="end">
+
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical"
+        android:background="?android:attr/colorBackground" >
+
+        <ListView
+            android:id="@+id/bookmarks_drawer_listview"
+            android:layout_height="0dp"
+            android:layout_width="match_parent"
+            android:layout_weight="1"
+            android:divider="@color/transparent"
+            android:dividerHeight="0dp" />
+
+        <!-- A compound drawable doesn't work well because only the image view should execute the `onClick()`. -->
+        <LinearLayout
+            android:id="@+id/bookmarks_header_linearlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:orientation="horizontal"
+            tools:ignore="UseCompoundDrawables" >
+
+            <ImageView
+                android:layout_height="match_parent"
+                android:layout_width="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:paddingStart="15dp"
+                android:paddingEnd="15dp"
+                android:src="@drawable/back"
+                android:background="?attr/selectableItemBackground"
+                android:onClick="bookmarksBack"
+                android:contentDescription="@string/back"
+                app:tint="?android:attr/textColorPrimary" />
+
+            <TextView
+                android:id="@+id/bookmarks_title_textview"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                android:textStyle="bold"
+                android:textSize="20sp"
+                android:textColor="?android:attr/textColorPrimary"
+                android:layout_margin="10dp" />
+        </LinearLayout>
+    </LinearLayout>
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/launch_bookmarks_activity_fab"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_marginEnd="16dp"
+        android:layout_marginBottom="200dp"
+        android:src="@drawable/bookmarks_day"
+        android:tint="?attr/fabIconTintColor"
+        android:contentDescription="@string/bookmarks" />
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/create_bookmark_folder_fab"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_marginEnd="16dp"
+        android:layout_marginBottom="130dp"
+        android:src="@drawable/create_folder"
+        android:tint="?attr/fabIconTintColor"
+        android:contentDescription="@string/create_folder" />
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/create_bookmark_fab"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_marginEnd="16dp"
+        android:layout_marginBottom="60dp"
+        android:src="@drawable/create_bookmark"
+        android:tint="?attr/fabIconTintColor"
+        android:contentDescription="@string/create_bookmark" />
+</FrameLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/bookmarks_drawer_top_appbar.xml b/app/src/main/res/layout/bookmarks_drawer_top_appbar.xml
new file mode 100644 (file)
index 0000000..4ebce6d
--- /dev/null
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2017-2020 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<FrameLayout
+    android:id="@+id/bookmarks_framelayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent"
+    android:layout_gravity="end">
+
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical"
+        android:background="?android:attr/colorBackground" >
+
+        <!-- A compound drawable doesn't work well because only the image view should execute the `onClick()`. -->
+        <LinearLayout
+            android:id="@+id/bookmarks_header_linearlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:orientation="horizontal"
+            tools:ignore="UseCompoundDrawables" >
+
+            <ImageView
+                android:layout_height="match_parent"
+                android:layout_width="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:paddingStart="15dp"
+                android:paddingEnd="15dp"
+                android:src="@drawable/back"
+                android:background="?attr/selectableItemBackground"
+                android:onClick="bookmarksBack"
+                android:contentDescription="@string/back"
+                app:tint="?android:attr/textColorPrimary" />
+
+            <TextView
+                android:id="@+id/bookmarks_title_textview"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                android:textStyle="bold"
+                android:textSize="20sp"
+                android:textColor="?android:attr/textColorPrimary"
+                android:layout_margin="10dp" />
+        </LinearLayout>
+
+        <ListView
+            android:id="@+id/bookmarks_drawer_listview"
+            android:layout_height="0dp"
+            android:layout_width="match_parent"
+            android:layout_weight="1"
+            android:divider="@color/transparent"
+            android:dividerHeight="0dp" />
+    </LinearLayout>
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/launch_bookmarks_activity_fab"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_marginEnd="16dp"
+        android:layout_marginBottom="155dp"
+        android:src="@drawable/bookmarks_day"
+        android:tint="?attr/fabIconTintColor"
+        android:contentDescription="@string/bookmarks" />
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/create_bookmark_folder_fab"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_marginEnd="16dp"
+        android:layout_marginBottom="85dp"
+        android:src="@drawable/create_folder"
+        android:tint="?attr/fabIconTintColor"
+        android:contentDescription="@string/create_folder" />
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/create_bookmark_fab"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_margin="16dp"
+        android:src="@drawable/create_bookmark"
+        android:tint="?attr/fabIconTintColor"
+        android:contentDescription="@string/create_bookmark" />
+</FrameLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/domains_coordinatorlayout.xml b/app/src/main/res/layout/domains_coordinatorlayout.xml
deleted file mode 100644 (file)
index 60d14cb..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2017,2019-2020 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<androidx.coordinatorlayout.widget.CoordinatorLayout
-    android:id="@+id/domains_coordinatorlayout"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_height="match_parent"
-    android:layout_width="match_parent"
-    android:fitsSystemWindows="true" >
-
-    <!-- The linear layout with `orientation="vertical"` moves the content below the app bar layout. -->
-    <LinearLayout
-        android:layout_height="match_parent"
-        android:layout_width="match_parent"
-        android:orientation="vertical" >
-
-        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
-        <com.google.android.material.appbar.AppBarLayout
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:background="?android:attr/colorBackground"
-            android:theme="@style/PrivacyBrowserAppBar" >
-
-            <androidx.appcompat.widget.Toolbar
-                android:id="@+id/domains_toolbar"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent" />
-        </com.google.android.material.appbar.AppBarLayout>
-
-        <include layout="@layout/domains_fragments" />
-    </LinearLayout>
-
-    <com.google.android.material.floatingactionbutton.FloatingActionButton
-        android:id="@+id/add_domain_fab"
-        android:layout_height="wrap_content"
-        android:layout_width="wrap_content"
-        android:layout_gravity="bottom|end"
-        android:layout_margin="16dp"
-        android:src="@drawable/add"
-        android:tint="?attr/fabIconTintColor" />
-</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/domains_coordinatorlayout_bottom_appbar.xml b/app/src/main/res/layout/domains_coordinatorlayout_bottom_appbar.xml
new file mode 100644 (file)
index 0000000..4af8490
--- /dev/null
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2017,2019-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+    android:id="@+id/domains_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent"
+    android:fitsSystemWindows="true" >
+
+    <!-- The linear layout with `orientation="vertical"` keeps the content above the app bar layout.  `app:layout_dodgeInsetEdges="bottom"` as a child of a coordinator layout moves the view above snackbars. -->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical"
+        app:layout_dodgeInsetEdges="bottom" >
+
+        <include layout="@layout/domains_fragments" />
+
+        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
+        <com.google.android.material.appbar.AppBarLayout
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:background="?android:attr/colorBackground"
+            android:theme="@style/PrivacyBrowserAppBar" >
+
+            <androidx.appcompat.widget.Toolbar
+                android:id="@+id/domains_toolbar"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" />
+        </com.google.android.material.appbar.AppBarLayout>
+    </LinearLayout>
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/add_domain_fab"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_marginEnd="16dp"
+        android:layout_marginBottom="70dp"
+        android:src="@drawable/add"
+        android:tint="?attr/fabIconTintColor"
+        android:contentDescription="@string/add_domain" />
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/domains_coordinatorlayout_top_appbar.xml b/app/src/main/res/layout/domains_coordinatorlayout_top_appbar.xml
new file mode 100644 (file)
index 0000000..6efd1d7
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2017,2019-2020 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+    android:id="@+id/domains_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent"
+    android:fitsSystemWindows="true" >
+
+    <!-- The linear layout with `orientation="vertical"` moves the content below the app bar layout. -->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical" >
+
+        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
+        <com.google.android.material.appbar.AppBarLayout
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:background="?android:attr/colorBackground"
+            android:theme="@style/PrivacyBrowserAppBar" >
+
+            <androidx.appcompat.widget.Toolbar
+                android:id="@+id/domains_toolbar"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" />
+        </com.google.android.material.appbar.AppBarLayout>
+
+        <include layout="@layout/domains_fragments" />
+    </LinearLayout>
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/add_domain_fab"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_margin="16dp"
+        android:src="@drawable/add"
+        android:tint="?attr/fabIconTintColor"
+        android:contentDescription="@string/add_domain" />
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
index b706f2eb87189e2af62c51f2347be0cddacd1656..7271f48fb9e1785be1eb1052ffa873d711939289 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  Copyright © 2017 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2017,2021 Soren Stoutner <soren@stoutner.com>.
 
   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
 
@@ -21,5 +21,6 @@
 <RelativeLayout
     android:id="@+id/domains_listview_fragment_container"
     xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_height="match_parent"
-    android:layout_width="match_parent" />
\ No newline at end of file
+    android:layout_height="0dp"
+    android:layout_width="match_parent"
+    android:layout_weight="1" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/guide_coordinatorlayout.xml b/app/src/main/res/layout/guide_coordinatorlayout.xml
deleted file mode 100644 (file)
index d3ac643..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2016-2017,2019-2020 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<androidx.coordinatorlayout.widget.CoordinatorLayout
-    android:id="@+id/guide_coordinatorlayout"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:layout_height="match_parent"
-    android:layout_width="match_parent" >
-
-    <!-- The linear layout with `orientation="vertical"` moves the view pager below the app bar layout. -->
-    <LinearLayout
-        android:layout_height="match_parent"
-        android:layout_width="match_parent"
-        android:orientation="vertical" >
-
-        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
-        <com.google.android.material.appbar.AppBarLayout
-            android:id="@+id/guide_appbarlayout"
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:background="?android:attr/colorBackground"
-            android:theme="@style/PrivacyBrowserAppBar" >
-
-            <androidx.appcompat.widget.Toolbar
-                android:id="@+id/guide_toolbar"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent" />
-
-            <com.google.android.material.tabs.TabLayout
-                android:id="@+id/guide_tablayout"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                app:tabMode="scrollable" />
-        </com.google.android.material.appbar.AppBarLayout>
-
-        <!-- `android:layout_weight="1"` makes `about_viewpager` fill the rest of the screen. -->
-        <androidx.viewpager.widget.ViewPager
-            android:id="@+id/guide_viewpager"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:layout_weight="1" />
-    </LinearLayout>
-</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/guide_coordinatorlayout_bottom_appbar.xml b/app/src/main/res/layout/guide_coordinatorlayout_bottom_appbar.xml
new file mode 100644 (file)
index 0000000..645d587
--- /dev/null
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2016-2017,2019-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+    android:id="@+id/guide_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent" >
+
+    <!-- The linear layout with `orientation="vertical"` keeps the view pager above the app bar layout.
+        `app:layout_dodgeInsetEdges="bottom"` as a child of a coordinator layout moves the view above snackbars. -->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical"
+        app:layout_dodgeInsetEdges="bottom" >
+
+        <!-- `android:layout_weight="1"` makes the view pager fill the rest of the screen. -->
+        <androidx.viewpager.widget.ViewPager
+            android:id="@+id/guide_viewpager"
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_weight="1" />
+
+        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
+        <com.google.android.material.appbar.AppBarLayout
+            android:id="@+id/guide_appbarlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:background="?android:attr/colorBackground"
+            android:theme="@style/PrivacyBrowserAppBar" >
+
+            <com.google.android.material.tabs.TabLayout
+                android:id="@+id/guide_tablayout"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                app:tabMode="scrollable" />
+
+            <androidx.appcompat.widget.Toolbar
+                android:id="@+id/guide_toolbar"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" />
+        </com.google.android.material.appbar.AppBarLayout>
+    </LinearLayout>
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/guide_coordinatorlayout_top_appbar.xml b/app/src/main/res/layout/guide_coordinatorlayout_top_appbar.xml
new file mode 100644 (file)
index 0000000..9724e44
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2016-2017,2019-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+    android:id="@+id/guide_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent" >
+
+    <!-- The linear layout with `orientation="vertical"` moves the view pager below the app bar layout. -->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical" >
+
+        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
+        <com.google.android.material.appbar.AppBarLayout
+            android:id="@+id/guide_appbarlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:background="?android:attr/colorBackground"
+            android:theme="@style/PrivacyBrowserAppBar" >
+
+            <com.google.android.material.tabs.TabLayout
+                android:id="@+id/guide_tablayout"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                app:tabMode="scrollable" />
+
+            <androidx.appcompat.widget.Toolbar
+                android:id="@+id/guide_toolbar"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" />
+        </com.google.android.material.appbar.AppBarLayout>
+
+        <!-- `android:layout_weight="1"` makes the view pager fill the rest of the screen. -->
+        <androidx.viewpager.widget.ViewPager
+            android:id="@+id/guide_viewpager"
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_weight="1" />
+    </LinearLayout>
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/import_export_coordinatorlayout.xml b/app/src/main/res/layout/import_export_coordinatorlayout.xml
deleted file mode 100644 (file)
index 14ed655..0000000
+++ /dev/null
@@ -1,240 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2018-2021 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<androidx.coordinatorlayout.widget.CoordinatorLayout
-    android:id="@+id/import_export_coordinatorlayout"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:layout_height="match_parent"
-    android:layout_width="match_parent" >
-
-    <!-- the linear layout with `orientation="vertical"` moves the content below the app bar layout. -->
-    <LinearLayout
-        android:layout_height="match_parent"
-        android:layout_width="match_parent"
-        android:orientation="vertical" >
-
-        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
-        <com.google.android.material.appbar.AppBarLayout
-            android:id="@+id/import_export_appbarlayout"
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:background="?android:attr/colorBackground"
-            android:theme="@style/PrivacyBrowserAppBar" >
-
-            <androidx.appcompat.widget.Toolbar
-                android:id="@+id/import_export_toolbar"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent" />
-        </com.google.android.material.appbar.AppBarLayout>
-
-        <ScrollView
-            android:layout_height="match_parent"
-            android:layout_width="match_parent" >
-
-            <!-- Align the cards vertically. -->
-            <LinearLayout
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                android:orientation="vertical" >
-
-                <!-- The encryption card. -->
-                <androidx.cardview.widget.CardView
-                    android:layout_height="wrap_content"
-                    android:layout_width="match_parent"
-                    android:layout_marginTop="10dp"
-                    android:layout_marginBottom="5dp"
-                    android:layout_marginStart="10dp"
-                    android:layout_marginEnd="10dp" >
-
-                    <!-- Align the contents of the card vertically. -->
-                    <LinearLayout
-                        android:layout_height="match_parent"
-                        android:layout_width="match_parent"
-                        android:orientation="vertical"
-                        android:layout_marginTop="10dp"
-                        android:layout_marginBottom="20dp"
-                        android:layout_marginStart="10dp"
-                        android:layout_marginEnd="10dp" >
-
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:layout_gravity="center_horizontal"
-                            android:layout_marginBottom="6dp"
-                            android:text="@string/encryption"
-                            android:textSize="25sp"
-                            android:textStyle="bold"
-                            android:textColor="?colorAccent" />
-
-                        <Spinner
-                            android:id="@+id/encryption_spinner"
-                            android:layout_height="wrap_content"
-                            android:layout_width="wrap_content"
-                            android:layout_gravity="center_horizontal" />
-
-                        <!-- The encryption password. -->
-                        <com.google.android.material.textfield.TextInputLayout
-                            android:id="@+id/encryption_password_textinputlayout"
-                            android:layout_height="wrap_content"
-                            android:layout_width="match_parent"
-                            app:passwordToggleEnabled="true" >
-
-                            <com.google.android.material.textfield.TextInputEditText
-                                android:id="@+id/encryption_password_edittext"
-                                android:layout_height="wrap_content"
-                                android:layout_width="match_parent"
-                                android:hint="@string/password"
-                                android:inputType="textPassword"/>
-                        </com.google.android.material.textfield.TextInputLayout>
-
-                        <!-- KitKat password encryption message. -->
-                        <TextView
-                            android:id="@+id/kitkat_password_encryption_textview"
-                            android:layout_height="wrap_content"
-                            android:layout_width="wrap_content"
-                            android:layout_gravity="center_horizontal"
-                            android:layout_marginTop="10dp"
-                            android:text="@string/kitkat_password_encryption_message"
-                            android:textAlignment="center" />
-
-                        <!-- OpenKeychain required message. -->
-                        <TextView
-                            android:id="@+id/openkeychain_required_textview"
-                            android:layout_height="wrap_content"
-                            android:layout_width="wrap_content"
-                            android:layout_gravity="center_horizontal"
-                            android:layout_marginTop="10dp"
-                            android:text="@string/openkeychain_required"
-                            android:textAlignment="center" />
-                    </LinearLayout>
-                </androidx.cardview.widget.CardView>
-
-                <!-- The file location card. -->
-                <androidx.cardview.widget.CardView
-                    android:id="@+id/file_location_cardview"
-                    android:layout_height="wrap_content"
-                    android:layout_width="match_parent"
-                    android:layout_marginTop="5dp"
-                    android:layout_marginBottom="5dp"
-                    android:layout_marginStart="10dp"
-                    android:layout_marginEnd="10dp" >
-
-                    <!-- Align the contents of the card vertically. -->
-                    <LinearLayout
-                        android:layout_height="match_parent"
-                        android:layout_width="match_parent"
-                        android:orientation="vertical"
-                        android:layout_marginTop="10dp"
-                        android:layout_marginBottom="20dp"
-                        android:layout_marginStart="10dp"
-                        android:layout_marginEnd="10dp" >
-
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:layout_gravity="center_horizontal"
-                            android:layout_marginBottom="6dp"
-                            android:text="@string/file_location"
-                            android:textSize="25sp"
-                            android:textStyle="bold"
-                            android:textColor="?colorAccent" />
-
-                        <RadioGroup
-                            android:layout_height="wrap_content"
-                            android:layout_width="wrap_content"
-                            android:layout_gravity="center_horizontal"
-                            android:orientation="horizontal" >
-
-                            <RadioButton
-                                android:id="@+id/import_radiobutton"
-                                android:layout_height="wrap_content"
-                                android:layout_width="wrap_content"
-                                android:text="@string/import_button"
-                                android:layout_marginEnd="10dp"
-                                android:onClick="onClickRadioButton" />
-
-                            <RadioButton
-                                android:id="@+id/export_radiobutton"
-                                android:layout_height="wrap_content"
-                                android:layout_width="wrap_content"
-                                android:text="@string/export"
-                                android:onClick="onClickRadioButton" />
-                        </RadioGroup>
-
-                        <!-- Align the edit text and the select file button horizontally. -->
-                        <LinearLayout
-                            android:id="@+id/file_name_linearlayout"
-                            android:layout_height="wrap_content"
-                            android:layout_width="match_parent"
-                            android:orientation="horizontal"
-                            android:layout_marginTop="10dp">
-
-                            <!-- The text input layout makes the hint float above the edit text. -->
-                            <com.google.android.material.textfield.TextInputLayout
-                                android:layout_height="wrap_content"
-                                android:layout_width="0dp"
-                                android:layout_weight="1" >
-
-                                <!-- `android:inputType="textUri" disables spell check and places an `/` on the main keyboard. -->
-                                <com.google.android.material.textfield.TextInputEditText
-                                    android:id="@+id/file_name_edittext"
-                                    android:layout_height="wrap_content"
-                                    android:layout_width="match_parent"
-                                    android:hint="@string/file_name"
-                                    android:inputType="textMultiLine|textUri" />
-                            </com.google.android.material.textfield.TextInputLayout>
-
-                            <Button
-                                android:id="@+id/browse_button"
-                                android:layout_height="wrap_content"
-                                android:layout_width="wrap_content"
-                                android:layout_gravity="center_vertical"
-                                android:text="@string/browse"
-                                android:onClick="browse" />
-                        </LinearLayout>
-
-                        <!-- OpenKeychain import instructions -->
-                        <TextView
-                            android:id="@+id/openkeychain_import_instructions_textview"
-                            android:layout_height="wrap_content"
-                            android:layout_width="wrap_content"
-                            android:layout_gravity="center_horizontal"
-                            android:layout_margin="5dp"
-                            android:text="@string/openkeychain_import_instructions"
-                            android:textAlignment="center" />
-
-                        <Button
-                            android:id="@+id/import_export_button"
-                            android:layout_height="wrap_content"
-                            android:layout_width="wrap_content"
-                            android:layout_gravity="center_horizontal"
-                            android:layout_marginTop="10dp"
-                            android:text="@string/import_button"
-                            android:textSize="18sp"
-                            android:onClick="importExport"
-                            app:backgroundTint="?attr/buttonBackgroundColorSelector"
-                            android:textColor="?attr/buttonTextColorSelector" />
-                    </LinearLayout>
-                </androidx.cardview.widget.CardView>
-            </LinearLayout>
-        </ScrollView>
-    </LinearLayout>
-</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/import_export_coordinatorlayout_bottom_appbar.xml b/app/src/main/res/layout/import_export_coordinatorlayout_bottom_appbar.xml
new file mode 100644 (file)
index 0000000..4f45eb1
--- /dev/null
@@ -0,0 +1,242 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2018-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+    android:id="@+id/import_export_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent" >
+
+    <!-- the linear layout with `orientation="vertical"` keeps the content above the app bar layout.  `app:layout_dodgeInsetEdges="bottom"` as a child of a coordinator layout moves the view above snackbars.-->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical"
+        app:layout_dodgeInsetEdges="bottom" >
+
+        <ScrollView
+            android:layout_height="0dp"
+            android:layout_width="match_parent"
+            android:layout_weight="1" >
+
+            <!-- Align the cards vertically. -->
+            <LinearLayout
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                android:orientation="vertical" >
+
+                <!-- The encryption card. -->
+                <androidx.cardview.widget.CardView
+                    android:layout_height="wrap_content"
+                    android:layout_width="match_parent"
+                    android:layout_marginTop="10dp"
+                    android:layout_marginBottom="5dp"
+                    android:layout_marginStart="10dp"
+                    android:layout_marginEnd="10dp" >
+
+                    <!-- Align the contents of the card vertically. -->
+                    <LinearLayout
+                        android:layout_height="match_parent"
+                        android:layout_width="match_parent"
+                        android:orientation="vertical"
+                        android:layout_marginTop="10dp"
+                        android:layout_marginBottom="20dp"
+                        android:layout_marginStart="10dp"
+                        android:layout_marginEnd="10dp" >
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center_horizontal"
+                            android:layout_marginBottom="6dp"
+                            android:text="@string/encryption"
+                            android:textSize="25sp"
+                            android:textStyle="bold"
+                            android:textColor="?colorAccent" />
+
+                        <Spinner
+                            android:id="@+id/encryption_spinner"
+                            android:layout_height="wrap_content"
+                            android:layout_width="wrap_content"
+                            android:layout_gravity="center_horizontal" />
+
+                        <!-- The encryption password. -->
+                        <com.google.android.material.textfield.TextInputLayout
+                            android:id="@+id/encryption_password_textinputlayout"
+                            android:layout_height="wrap_content"
+                            android:layout_width="match_parent"
+                            app:passwordToggleEnabled="true" >
+
+                            <com.google.android.material.textfield.TextInputEditText
+                                android:id="@+id/encryption_password_edittext"
+                                android:layout_height="wrap_content"
+                                android:layout_width="match_parent"
+                                android:hint="@string/password"
+                                android:inputType="textPassword"/>
+                        </com.google.android.material.textfield.TextInputLayout>
+
+                        <!-- KitKat password encryption message. -->
+                        <TextView
+                            android:id="@+id/kitkat_password_encryption_textview"
+                            android:layout_height="wrap_content"
+                            android:layout_width="wrap_content"
+                            android:layout_gravity="center_horizontal"
+                            android:layout_marginTop="10dp"
+                            android:text="@string/kitkat_password_encryption_message"
+                            android:textAlignment="center" />
+
+                        <!-- OpenKeychain required message. -->
+                        <TextView
+                            android:id="@+id/openkeychain_required_textview"
+                            android:layout_height="wrap_content"
+                            android:layout_width="wrap_content"
+                            android:layout_gravity="center_horizontal"
+                            android:layout_marginTop="10dp"
+                            android:text="@string/openkeychain_required"
+                            android:textAlignment="center" />
+                    </LinearLayout>
+                </androidx.cardview.widget.CardView>
+
+                <!-- The file location card. -->
+                <androidx.cardview.widget.CardView
+                    android:id="@+id/file_location_cardview"
+                    android:layout_height="wrap_content"
+                    android:layout_width="match_parent"
+                    android:layout_marginTop="5dp"
+                    android:layout_marginBottom="5dp"
+                    android:layout_marginStart="10dp"
+                    android:layout_marginEnd="10dp" >
+
+                    <!-- Align the contents of the card vertically. -->
+                    <LinearLayout
+                        android:layout_height="match_parent"
+                        android:layout_width="match_parent"
+                        android:orientation="vertical"
+                        android:layout_marginTop="10dp"
+                        android:layout_marginBottom="20dp"
+                        android:layout_marginStart="10dp"
+                        android:layout_marginEnd="10dp" >
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center_horizontal"
+                            android:layout_marginBottom="6dp"
+                            android:text="@string/file_location"
+                            android:textSize="25sp"
+                            android:textStyle="bold"
+                            android:textColor="?colorAccent" />
+
+                        <RadioGroup
+                            android:layout_height="wrap_content"
+                            android:layout_width="wrap_content"
+                            android:layout_gravity="center_horizontal"
+                            android:orientation="horizontal" >
+
+                            <RadioButton
+                                android:id="@+id/import_radiobutton"
+                                android:layout_height="wrap_content"
+                                android:layout_width="wrap_content"
+                                android:text="@string/import_button"
+                                android:layout_marginEnd="10dp"
+                                android:onClick="onClickRadioButton" />
+
+                            <RadioButton
+                                android:id="@+id/export_radiobutton"
+                                android:layout_height="wrap_content"
+                                android:layout_width="wrap_content"
+                                android:text="@string/export"
+                                android:onClick="onClickRadioButton" />
+                        </RadioGroup>
+
+                        <!-- Align the edit text and the select file button horizontally. -->
+                        <LinearLayout
+                            android:id="@+id/file_name_linearlayout"
+                            android:layout_height="wrap_content"
+                            android:layout_width="match_parent"
+                            android:orientation="horizontal"
+                            android:layout_marginTop="10dp">
+
+                            <!-- The text input layout makes the hint float above the edit text. -->
+                            <com.google.android.material.textfield.TextInputLayout
+                                android:layout_height="wrap_content"
+                                android:layout_width="0dp"
+                                android:layout_weight="1" >
+
+                                <!-- `android:inputType="textUri" disables spell check and places an `/` on the main keyboard. -->
+                                <com.google.android.material.textfield.TextInputEditText
+                                    android:id="@+id/file_name_edittext"
+                                    android:layout_height="wrap_content"
+                                    android:layout_width="match_parent"
+                                    android:hint="@string/file_name"
+                                    android:inputType="textMultiLine|textUri" />
+                            </com.google.android.material.textfield.TextInputLayout>
+
+                            <Button
+                                android:id="@+id/browse_button"
+                                android:layout_height="wrap_content"
+                                android:layout_width="wrap_content"
+                                android:layout_gravity="center_vertical"
+                                android:text="@string/browse"
+                                android:onClick="browse" />
+                        </LinearLayout>
+
+                        <!-- OpenKeychain import instructions -->
+                        <TextView
+                            android:id="@+id/openkeychain_import_instructions_textview"
+                            android:layout_height="wrap_content"
+                            android:layout_width="wrap_content"
+                            android:layout_gravity="center_horizontal"
+                            android:layout_margin="5dp"
+                            android:text="@string/openkeychain_import_instructions"
+                            android:textAlignment="center" />
+
+                        <Button
+                            android:id="@+id/import_export_button"
+                            android:layout_height="wrap_content"
+                            android:layout_width="wrap_content"
+                            android:layout_gravity="center_horizontal"
+                            android:layout_marginTop="10dp"
+                            android:text="@string/import_button"
+                            android:textSize="18sp"
+                            android:onClick="importExport"
+                            app:backgroundTint="?attr/buttonBackgroundColorSelector"
+                            android:textColor="?attr/buttonTextColorSelector" />
+                    </LinearLayout>
+                </androidx.cardview.widget.CardView>
+            </LinearLayout>
+        </ScrollView>
+
+        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
+        <com.google.android.material.appbar.AppBarLayout
+            android:id="@+id/import_export_appbarlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:background="?android:attr/colorBackground"
+            android:theme="@style/PrivacyBrowserAppBar" >
+
+            <androidx.appcompat.widget.Toolbar
+                android:id="@+id/import_export_toolbar"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" />
+        </com.google.android.material.appbar.AppBarLayout>
+    </LinearLayout>
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/import_export_coordinatorlayout_top_appbar.xml b/app/src/main/res/layout/import_export_coordinatorlayout_top_appbar.xml
new file mode 100644 (file)
index 0000000..14ed655
--- /dev/null
@@ -0,0 +1,240 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2018-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+    android:id="@+id/import_export_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent" >
+
+    <!-- the linear layout with `orientation="vertical"` moves the content below the app bar layout. -->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical" >
+
+        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
+        <com.google.android.material.appbar.AppBarLayout
+            android:id="@+id/import_export_appbarlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:background="?android:attr/colorBackground"
+            android:theme="@style/PrivacyBrowserAppBar" >
+
+            <androidx.appcompat.widget.Toolbar
+                android:id="@+id/import_export_toolbar"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" />
+        </com.google.android.material.appbar.AppBarLayout>
+
+        <ScrollView
+            android:layout_height="match_parent"
+            android:layout_width="match_parent" >
+
+            <!-- Align the cards vertically. -->
+            <LinearLayout
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                android:orientation="vertical" >
+
+                <!-- The encryption card. -->
+                <androidx.cardview.widget.CardView
+                    android:layout_height="wrap_content"
+                    android:layout_width="match_parent"
+                    android:layout_marginTop="10dp"
+                    android:layout_marginBottom="5dp"
+                    android:layout_marginStart="10dp"
+                    android:layout_marginEnd="10dp" >
+
+                    <!-- Align the contents of the card vertically. -->
+                    <LinearLayout
+                        android:layout_height="match_parent"
+                        android:layout_width="match_parent"
+                        android:orientation="vertical"
+                        android:layout_marginTop="10dp"
+                        android:layout_marginBottom="20dp"
+                        android:layout_marginStart="10dp"
+                        android:layout_marginEnd="10dp" >
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center_horizontal"
+                            android:layout_marginBottom="6dp"
+                            android:text="@string/encryption"
+                            android:textSize="25sp"
+                            android:textStyle="bold"
+                            android:textColor="?colorAccent" />
+
+                        <Spinner
+                            android:id="@+id/encryption_spinner"
+                            android:layout_height="wrap_content"
+                            android:layout_width="wrap_content"
+                            android:layout_gravity="center_horizontal" />
+
+                        <!-- The encryption password. -->
+                        <com.google.android.material.textfield.TextInputLayout
+                            android:id="@+id/encryption_password_textinputlayout"
+                            android:layout_height="wrap_content"
+                            android:layout_width="match_parent"
+                            app:passwordToggleEnabled="true" >
+
+                            <com.google.android.material.textfield.TextInputEditText
+                                android:id="@+id/encryption_password_edittext"
+                                android:layout_height="wrap_content"
+                                android:layout_width="match_parent"
+                                android:hint="@string/password"
+                                android:inputType="textPassword"/>
+                        </com.google.android.material.textfield.TextInputLayout>
+
+                        <!-- KitKat password encryption message. -->
+                        <TextView
+                            android:id="@+id/kitkat_password_encryption_textview"
+                            android:layout_height="wrap_content"
+                            android:layout_width="wrap_content"
+                            android:layout_gravity="center_horizontal"
+                            android:layout_marginTop="10dp"
+                            android:text="@string/kitkat_password_encryption_message"
+                            android:textAlignment="center" />
+
+                        <!-- OpenKeychain required message. -->
+                        <TextView
+                            android:id="@+id/openkeychain_required_textview"
+                            android:layout_height="wrap_content"
+                            android:layout_width="wrap_content"
+                            android:layout_gravity="center_horizontal"
+                            android:layout_marginTop="10dp"
+                            android:text="@string/openkeychain_required"
+                            android:textAlignment="center" />
+                    </LinearLayout>
+                </androidx.cardview.widget.CardView>
+
+                <!-- The file location card. -->
+                <androidx.cardview.widget.CardView
+                    android:id="@+id/file_location_cardview"
+                    android:layout_height="wrap_content"
+                    android:layout_width="match_parent"
+                    android:layout_marginTop="5dp"
+                    android:layout_marginBottom="5dp"
+                    android:layout_marginStart="10dp"
+                    android:layout_marginEnd="10dp" >
+
+                    <!-- Align the contents of the card vertically. -->
+                    <LinearLayout
+                        android:layout_height="match_parent"
+                        android:layout_width="match_parent"
+                        android:orientation="vertical"
+                        android:layout_marginTop="10dp"
+                        android:layout_marginBottom="20dp"
+                        android:layout_marginStart="10dp"
+                        android:layout_marginEnd="10dp" >
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center_horizontal"
+                            android:layout_marginBottom="6dp"
+                            android:text="@string/file_location"
+                            android:textSize="25sp"
+                            android:textStyle="bold"
+                            android:textColor="?colorAccent" />
+
+                        <RadioGroup
+                            android:layout_height="wrap_content"
+                            android:layout_width="wrap_content"
+                            android:layout_gravity="center_horizontal"
+                            android:orientation="horizontal" >
+
+                            <RadioButton
+                                android:id="@+id/import_radiobutton"
+                                android:layout_height="wrap_content"
+                                android:layout_width="wrap_content"
+                                android:text="@string/import_button"
+                                android:layout_marginEnd="10dp"
+                                android:onClick="onClickRadioButton" />
+
+                            <RadioButton
+                                android:id="@+id/export_radiobutton"
+                                android:layout_height="wrap_content"
+                                android:layout_width="wrap_content"
+                                android:text="@string/export"
+                                android:onClick="onClickRadioButton" />
+                        </RadioGroup>
+
+                        <!-- Align the edit text and the select file button horizontally. -->
+                        <LinearLayout
+                            android:id="@+id/file_name_linearlayout"
+                            android:layout_height="wrap_content"
+                            android:layout_width="match_parent"
+                            android:orientation="horizontal"
+                            android:layout_marginTop="10dp">
+
+                            <!-- The text input layout makes the hint float above the edit text. -->
+                            <com.google.android.material.textfield.TextInputLayout
+                                android:layout_height="wrap_content"
+                                android:layout_width="0dp"
+                                android:layout_weight="1" >
+
+                                <!-- `android:inputType="textUri" disables spell check and places an `/` on the main keyboard. -->
+                                <com.google.android.material.textfield.TextInputEditText
+                                    android:id="@+id/file_name_edittext"
+                                    android:layout_height="wrap_content"
+                                    android:layout_width="match_parent"
+                                    android:hint="@string/file_name"
+                                    android:inputType="textMultiLine|textUri" />
+                            </com.google.android.material.textfield.TextInputLayout>
+
+                            <Button
+                                android:id="@+id/browse_button"
+                                android:layout_height="wrap_content"
+                                android:layout_width="wrap_content"
+                                android:layout_gravity="center_vertical"
+                                android:text="@string/browse"
+                                android:onClick="browse" />
+                        </LinearLayout>
+
+                        <!-- OpenKeychain import instructions -->
+                        <TextView
+                            android:id="@+id/openkeychain_import_instructions_textview"
+                            android:layout_height="wrap_content"
+                            android:layout_width="wrap_content"
+                            android:layout_gravity="center_horizontal"
+                            android:layout_margin="5dp"
+                            android:text="@string/openkeychain_import_instructions"
+                            android:textAlignment="center" />
+
+                        <Button
+                            android:id="@+id/import_export_button"
+                            android:layout_height="wrap_content"
+                            android:layout_width="wrap_content"
+                            android:layout_gravity="center_horizontal"
+                            android:layout_marginTop="10dp"
+                            android:text="@string/import_button"
+                            android:textSize="18sp"
+                            android:onClick="importExport"
+                            app:backgroundTint="?attr/buttonBackgroundColorSelector"
+                            android:textColor="?attr/buttonTextColorSelector" />
+                    </LinearLayout>
+                </androidx.cardview.widget.CardView>
+            </LinearLayout>
+        </ScrollView>
+    </LinearLayout>
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/logcat_coordinatorlayout.xml b/app/src/main/res/layout/logcat_coordinatorlayout.xml
deleted file mode 100644 (file)
index 2c605a3..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2018-2020 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<androidx.coordinatorlayout.widget.CoordinatorLayout
-    android:id="@+id/logcat_coordinatorlayout"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_height="match_parent"
-    android:layout_width="match_parent" >
-
-    <!-- the LinearLayout with `orientation="vertical"` moves the content below the AppBarLayout. -->
-    <LinearLayout
-        android:layout_height="match_parent"
-        android:layout_width="match_parent"
-        android:orientation="vertical" >
-
-        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme.  The background is set programmatically based on the proxy status. -->
-        <com.google.android.material.appbar.AppBarLayout
-            android:id="@+id/logcat_appbarlayout"
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:background="?android:attr/colorBackground"
-            android:theme="@style/PrivacyBrowserAppBar" >
-
-            <androidx.appcompat.widget.Toolbar
-                android:id="@+id/logcat_toolbar"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent" />
-        </com.google.android.material.appbar.AppBarLayout>
-
-        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
-            android:id="@+id/logcat_swiperefreshlayout"
-            android:layout_height="match_parent"
-            android:layout_width="match_parent" >
-
-            <ScrollView
-                android:id="@+id/logcat_scrollview"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent" >
-
-                <TextView
-                    android:id="@+id/logcat_textview"
-                    android:layout_height="wrap_content"
-                    android:layout_width="match_parent"
-                    android:layout_margin="10dp"
-                    android:textIsSelectable="true" />
-            </ScrollView>
-        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
-    </LinearLayout>
-</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/logcat_coordinatorlayout_bottom_appbar.xml b/app/src/main/res/layout/logcat_coordinatorlayout_bottom_appbar.xml
new file mode 100644 (file)
index 0000000..e7e4051
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2018-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+    android:id="@+id/logcat_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent" >
+
+    <!-- The linear layout with `orientation="vertical"` keeps the content above the app bar layout.  `app:layout_dodgeInsetEdges="bottom"` as a child of a coordinator layout moves the view above snackbars. -->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical"
+        app:layout_dodgeInsetEdges="bottom" >
+
+        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
+            android:id="@+id/logcat_swiperefreshlayout"
+            android:layout_height="0dp"
+            android:layout_width="match_parent"
+            android:layout_weight="1" >
+
+            <ScrollView
+                android:id="@+id/logcat_scrollview"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" >
+
+                <TextView
+                    android:id="@+id/logcat_textview"
+                    android:layout_height="wrap_content"
+                    android:layout_width="match_parent"
+                    android:layout_margin="10dp"
+                    android:textIsSelectable="true" />
+            </ScrollView>
+        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
+
+        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
+        <com.google.android.material.appbar.AppBarLayout
+            android:id="@+id/logcat_appbarlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:background="?android:attr/colorBackground"
+            android:theme="@style/PrivacyBrowserAppBar" >
+
+            <androidx.appcompat.widget.Toolbar
+                android:id="@+id/logcat_toolbar"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" />
+        </com.google.android.material.appbar.AppBarLayout>
+    </LinearLayout>
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/logcat_coordinatorlayout_top_appbar.xml b/app/src/main/res/layout/logcat_coordinatorlayout_top_appbar.xml
new file mode 100644 (file)
index 0000000..8179fa8
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2018-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+    android:id="@+id/logcat_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent" >
+
+    <!-- The linear layout with `orientation="vertical"` moves the content below the app bar layout. -->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical" >
+
+        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
+        <com.google.android.material.appbar.AppBarLayout
+            android:id="@+id/logcat_appbarlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:background="?android:attr/colorBackground"
+            android:theme="@style/PrivacyBrowserAppBar" >
+
+            <androidx.appcompat.widget.Toolbar
+                android:id="@+id/logcat_toolbar"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" />
+        </com.google.android.material.appbar.AppBarLayout>
+
+        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
+            android:id="@+id/logcat_swiperefreshlayout"
+            android:layout_height="match_parent"
+            android:layout_width="match_parent" >
+
+            <ScrollView
+                android:id="@+id/logcat_scrollview"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" >
+
+                <TextView
+                    android:id="@+id/logcat_textview"
+                    android:layout_height="wrap_content"
+                    android:layout_width="match_parent"
+                    android:layout_margin="10dp"
+                    android:textIsSelectable="true" />
+            </ScrollView>
+        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
+    </LinearLayout>
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/main_framelayout.xml b/app/src/main/res/layout/main_framelayout.xml
deleted file mode 100644 (file)
index f912025..0000000
+++ /dev/null
@@ -1,245 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2015-2017,2019-2020 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<FrameLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:id="@+id/root_framelayout"
-    android:layout_height="match_parent"
-    android:layout_width="match_parent" >
-
-    <androidx.drawerlayout.widget.DrawerLayout
-        android:id="@+id/drawerlayout"
-        android:layout_height="match_parent"
-        android:layout_width="match_parent" >
-
-        <!-- The relative layout contains the AdView and the coordinator layout, which contains the rest of the views. -->
-        <RelativeLayout
-            android:id="@+id/main_content_relativelayout"
-            android:layout_height="match_parent"
-            android:layout_width="match_parent" >
-
-            <!-- Include the AdView.  For the standard flavor, this just includes a TextView with `visibility="gone"`. -->
-            <include layout="@layout/adview" />
-
-            <!-- Setting the CoordinatorLayout to be `focusableInTouchMode` prevents the URL text box from stealing focus on launch and opening the keyboard. -->
-            <androidx.coordinatorlayout.widget.CoordinatorLayout
-                android:layout_height="match_parent"
-                android:layout_width="match_parent"
-                android:layout_above="@id/adview"
-                android:focusable="true"
-                android:focusableInTouchMode="true" >
-
-                <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme.  The background is set programmatically based on the proxy status. -->
-                <com.google.android.material.appbar.AppBarLayout
-                    android:id="@+id/appbar_layout"
-                    android:layout_height="wrap_content"
-                    android:layout_width="match_parent"
-                    android:theme="@style/PrivacyBrowserAppBar" >
-
-                    <!-- The toolbar.  It is initially `visibility="gone"` so it doesn't display while the blocklists are loading. -->
-                    <androidx.appcompat.widget.Toolbar
-                        android:id="@+id/toolbar"
-                        android:layout_height="wrap_content"
-                        android:layout_width="match_parent"
-                        android:visibility="gone"
-                        app:layout_scrollFlags="scroll|enterAlways|snap" />
-
-                    <!-- The find on page linear layout.  It is initially `visibility="gone"` so it doesn't display while the blocklists are loading. -->
-                    <LinearLayout
-                        android:id="@+id/find_on_page_linearlayout"
-                        android:layout_height="wrap_content"
-                        android:layout_width="match_parent"
-                        android:orientation="horizontal"
-                        android:visibility="gone"
-                        app:layout_scrollFlags="scroll|enterAlways|snap" >
-
-                        <!-- `android:imeOptions="actionDone"` sets the keyboard to have a `check mark` key instead of a `new line` key. -->
-                        <EditText
-                            android:id="@+id/find_on_page_edittext"
-                            android:layout_height="wrap_content"
-                            android:layout_width="0dp"
-                            android:layout_weight="1"
-                            android:layout_marginStart="8dp"
-                            android:layout_marginEnd="4dp"
-                            android:hint="@string/find_on_page"
-                            android:lines="1"
-                            android:imeOptions="actionDone"
-                            android:inputType="text"
-                            tools:ignore="Autofill" />
-
-                        <TextView
-                            android:id="@+id/find_on_page_count_textview"
-                            android:layout_height="wrap_content"
-                            android:layout_width="wrap_content"
-                            android:layout_marginStart="4dp"
-                            android:layout_marginEnd="4dp"
-                            android:text="@string/zero_of_zero" />
-
-                        <!-- `android:background="?attr/selectableItemBackground"` adds a ripple animation on touch. -->
-                        <ImageView
-                            android:id="@+id/find_previous"
-                            android:src="@drawable/previous"
-                            android:layout_width="35dp"
-                            android:layout_height="35dp"
-                            android:layout_marginStart="4dp"
-                            android:layout_marginEnd="4dp"
-                            android:layout_gravity="center_vertical"
-                            android:background="?attr/selectableItemBackground"
-                            android:contentDescription="@string/previous"
-                            android:onClick="findPreviousOnPage"
-                            app:tint="?attr/findOnPageIconTintColor" />
-
-                        <!-- `android:background="?attr/selectableItemBackground"` adds a ripple animation on touch. -->
-                        <ImageView
-                            android:id="@+id/find_next"
-                            android:src="@drawable/next"
-                            android:layout_width="35dp"
-                            android:layout_height="35dp"
-                            android:layout_marginStart="4dp"
-                            android:layout_marginEnd="4dp"
-                            android:layout_gravity="center_vertical"
-                            android:background="?attr/selectableItemBackground"
-                            android:contentDescription="@string/next"
-                            android:onClick="findNextOnPage"
-                            app:tint="?attr/findOnPageIconTintColor" />
-
-                        <!-- `android:background="?attr/selectableItemBackground"` adds a ripple animation on touch. -->
-                        <ImageView
-                            android:id="@+id/close_find"
-                            android:src="@drawable/close_day"
-                            android:layout_width="35dp"
-                            android:layout_height="35dp"
-                            android:layout_marginStart="4dp"
-                            android:layout_marginEnd="8dp"
-                            android:layout_gravity="center_vertical"
-                            android:background="?attr/selectableItemBackground"
-                            android:contentDescription="@string/close"
-                            android:onClick="closeFindOnPage"
-                            app:tint="?attr/findOnPageIconTintColor" />
-                    </LinearLayout>
-
-                    <!-- The tab linear layout.  It sets the background to the right of the add tab button.  It is initially `visibility="gone"` so it doesn't display while the blocklists are loading. -->
-                    <LinearLayout
-                        android:id="@+id/tabs_linearlayout"
-                        android:layout_height="wrap_content"
-                        android:layout_width="wrap_content"
-                        android:orientation="horizontal"
-                        android:visibility="gone"
-                        app:layout_scrollFlags="scroll|enterAlways|snap" >
-
-                        <!-- `android:background="?attr/selectableItemBackground"` adds a ripple animation on touch. -->
-                        <ImageView
-                            android:layout_height="match_parent"
-                            android:layout_width="wrap_content"
-                            android:layout_gravity="center_vertical"
-                            android:paddingStart="10dp"
-                            android:paddingEnd="10dp"
-                            android:src="@drawable/close_day"
-                            android:background="?attr/selectableItemBackground"
-                            android:onClick="closeTab"
-                            android:contentDescription="@string/close_tab"
-                            app:tint="?attr/addTabIconTintColor" />
-
-                        <com.google.android.material.tabs.TabLayout
-                            android:id="@+id/tablayout"
-                            android:layout_height="wrap_content"
-                            android:layout_width="0dp"
-                            android:layout_weight="1"
-                            app:tabIndicatorGravity="top"
-                            app:tabMode="scrollable" />
-
-                        <!-- `android:background="?attr/selectableItemBackground"` adds a ripple animation on touch. -->
-                        <ImageView
-                            android:layout_height="match_parent"
-                            android:layout_width="wrap_content"
-                            android:layout_gravity="center_vertical"
-                            android:paddingStart="10dp"
-                            android:paddingEnd="10dp"
-                            android:src="@drawable/add"
-                            android:background="?attr/selectableItemBackground"
-                            android:onClick="addTab"
-                            android:contentDescription="@string/add_tab"
-                            app:tint="?attr/addTabIconTintColor" />
-                    </LinearLayout>
-                </com.google.android.material.appbar.AppBarLayout>
-
-                <!-- `app:layout_behavior="@string/appbar_scrolling_view_behavior"` must be set on the sibling of AppBarLayout. -->
-                <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
-                    android:id="@+id/swiperefreshlayout"
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    app:layout_behavior="@string/appbar_scrolling_view_behavior" >
-
-                        <com.stoutner.privacybrowser.views.NoSwipeViewPager
-                            android:id="@+id/webviewpager"
-                            android:layout_width="match_parent"
-                            android:layout_height="match_parent" />
-                </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
-            </androidx.coordinatorlayout.widget.CoordinatorLayout>
-        </RelativeLayout>
-
-        <!-- The navigation drawer. -->
-        <com.google.android.material.navigation.NavigationView
-            android:id="@+id/navigationview"
-            android:layout_height="match_parent"
-            android:layout_width="wrap_content"
-            android:layout_gravity="start"
-            app:menu="@menu/webview_navigation_menu"
-            app:itemIconTint="?attr/navigationIconTintColor" />
-
-        <!-- Include the bookmarks drawer, which varies based on screen width. -->
-        <include layout="@layout/bookmarks_drawer" />
-    </androidx.drawerlayout.widget.DrawerLayout>
-
-    <!-- The full screen video frame layout is used to display full screen videos.  It is initially `android:visibility="gone"` to hide it from view. -->
-    <FrameLayout
-        android:id="@+id/full_screen_video_framelayout"
-        android:layout_height="match_parent"
-        android:layout_width="match_parent"
-        android:visibility="gone" />
-
-    <!-- The loading blocklists relative layout displays when the app first starts.  It is hidden once the blocklists are populated. -->
-    <RelativeLayout
-        android:id="@+id/loading_blocklists_relativelayout"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-
-        <ImageView
-            android:id="@+id/privacy_browser_logo"
-            android:layout_height="256dp"
-            android:layout_width="256dp"
-            android:layout_centerInParent="true"
-            android:src="@drawable/privacy_browser_foreground"
-            tools:ignore="contentDescription" />
-
-        <TextView
-            android:id="@+id/loading_blocklist_textview"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_below="@id/privacy_browser_logo"
-            android:layout_centerHorizontal="true"
-            android:layout_margin="10dp"
-            android:textSize="16sp"
-            android:textAlignment="center"
-            android:textColor="?android:attr/textColorPrimary" />
-    </RelativeLayout>
-</FrameLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/main_framelayout_bottom_appbar.xml b/app/src/main/res/layout/main_framelayout_bottom_appbar.xml
new file mode 100644 (file)
index 0000000..2f295df
--- /dev/null
@@ -0,0 +1,249 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2015-2017,2019-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<FrameLayout
+    android:id="@+id/root_framelayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent" >
+
+    <androidx.drawerlayout.widget.DrawerLayout
+        android:id="@+id/drawerlayout"
+        android:layout_height="match_parent"
+        android:layout_width="match_parent" >
+
+        <!-- The relative layout contains the AdView and the coordinator layout, which contains the rest of the views. -->
+        <RelativeLayout
+            android:id="@+id/main_content_relativelayout"
+            android:layout_height="match_parent"
+            android:layout_width="match_parent" >
+
+            <!-- Include the AdView.  For the standard flavor, this just includes a TextView with `visibility="gone"`. -->
+            <include layout="@layout/adview_bottom_appbar" />
+
+            <!-- Setting the CoordinatorLayout to be `focusableInTouchMode` prevents the URL text box from stealing focus on launch and opening the keyboard. -->
+            <androidx.coordinatorlayout.widget.CoordinatorLayout
+                android:layout_height="match_parent"
+                android:layout_width="match_parent"
+                android:layout_below="@id/adview"
+                android:focusable="true"
+                android:focusableInTouchMode="true" >
+
+                    <!-- `app:layout_dodgeInsetEdges="bottom"` as a child of a coordinator layout moves the view above snackbars. -->
+                    <RelativeLayout
+                        android:layout_height="match_parent"
+                        android:layout_width="match_parent"
+                        app:layout_dodgeInsetEdges="bottom" >
+
+                        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
+                            android:id="@+id/swiperefreshlayout"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:layout_above="@id/appbar_layout" >
+
+                            <com.stoutner.privacybrowser.views.NoSwipeViewPager
+                                android:id="@+id/webviewpager"
+                                android:layout_height="match_parent"
+                                android:layout_width="match_parent" />
+                        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
+
+                        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme.  The background is set programmatically based on the proxy status. -->
+                        <com.google.android.material.appbar.AppBarLayout
+                            android:id="@+id/appbar_layout"
+                            android:layout_height="wrap_content"
+                            android:layout_width="match_parent"
+                            android:theme="@style/PrivacyBrowserAppBar"
+                            android:layout_alignParentBottom="true" >
+
+                            <!-- The tab linear layout.  It sets the background to the right of the add tab button.
+                                It is initially `visibility="gone"` so it doesn't display while the blocklists are loading. -->
+                            <LinearLayout
+                                android:id="@+id/tabs_linearlayout"
+                                android:layout_height="wrap_content"
+                                android:layout_width="wrap_content"
+                                android:orientation="horizontal"
+                                android:visibility="gone" >
+
+                                <!-- `android:background="?attr/selectableItemBackground"` adds a ripple animation on touch. -->
+                                <ImageView
+                                    android:layout_height="match_parent"
+                                    android:layout_width="wrap_content"
+                                    android:layout_gravity="center_vertical"
+                                    android:paddingStart="10dp"
+                                    android:paddingEnd="10dp"
+                                    android:src="@drawable/close_day"
+                                    android:background="?attr/selectableItemBackground"
+                                    android:onClick="closeTab"
+                                    android:contentDescription="@string/close_tab"
+                                    app:tint="?attr/addTabIconTintColor" />
+
+                                <com.google.android.material.tabs.TabLayout
+                                    android:id="@+id/tablayout"
+                                    android:layout_height="wrap_content"
+                                    android:layout_width="0dp"
+                                    android:layout_weight="1"
+                                    app:tabMode="scrollable" />
+
+                                <!-- `android:background="?attr/selectableItemBackground"` adds a ripple animation on touch. -->
+                                <ImageView
+                                    android:layout_height="match_parent"
+                                    android:layout_width="wrap_content"
+                                    android:layout_gravity="center_vertical"
+                                    android:paddingStart="10dp"
+                                    android:paddingEnd="10dp"
+                                    android:src="@drawable/add"
+                                    android:background="?attr/selectableItemBackground"
+                                    android:onClick="addTab"
+                                    android:contentDescription="@string/add_tab"
+                                    app:tint="?attr/addTabIconTintColor" />
+                            </LinearLayout>
+
+                            <!-- The find on page linear layout.  It is initially `visibility="gone"` so it doesn't display while the blocklists are loading. -->
+                            <LinearLayout
+                                android:id="@+id/find_on_page_linearlayout"
+                                android:layout_height="wrap_content"
+                                android:layout_width="match_parent"
+                                android:orientation="horizontal"
+                                android:visibility="gone" >
+
+                                <!-- `android:imeOptions="actionDone"` sets the keyboard to have a `check mark` key instead of a `new line` key. -->
+                                <EditText
+                                    android:id="@+id/find_on_page_edittext"
+                                    android:layout_height="wrap_content"
+                                    android:layout_width="0dp"
+                                    android:layout_weight="1"
+                                    android:layout_marginStart="8dp"
+                                    android:layout_marginEnd="4dp"
+                                    android:hint="@string/find_on_page"
+                                    android:lines="1"
+                                    android:imeOptions="actionDone"
+                                    android:inputType="text"
+                                    tools:ignore="Autofill" />
+
+                                <TextView
+                                    android:id="@+id/find_on_page_count_textview"
+                                    android:layout_height="wrap_content"
+                                    android:layout_width="wrap_content"
+                                    android:layout_marginStart="4dp"
+                                    android:layout_marginEnd="4dp"
+                                    android:text="@string/zero_of_zero" />
+
+                                <!-- `android:background="?attr/selectableItemBackground"` adds a ripple animation on touch. -->
+                                <ImageView
+                                    android:id="@+id/find_previous"
+                                    android:src="@drawable/previous"
+                                    android:layout_width="35dp"
+                                    android:layout_height="35dp"
+                                    android:layout_marginStart="4dp"
+                                    android:layout_marginEnd="4dp"
+                                    android:layout_gravity="center_vertical"
+                                    android:background="?attr/selectableItemBackground"
+                                    android:contentDescription="@string/previous"
+                                    android:onClick="findPreviousOnPage"
+                                    app:tint="?attr/findOnPageIconTintColor" />
+
+                                <!-- `android:background="?attr/selectableItemBackground"` adds a ripple animation on touch. -->
+                                <ImageView
+                                    android:id="@+id/find_next"
+                                    android:src="@drawable/next"
+                                    android:layout_width="35dp"
+                                    android:layout_height="35dp"
+                                    android:layout_marginStart="4dp"
+                                    android:layout_marginEnd="4dp"
+                                    android:layout_gravity="center_vertical"
+                                    android:background="?attr/selectableItemBackground"
+                                    android:contentDescription="@string/next"
+                                    android:onClick="findNextOnPage"
+                                    app:tint="?attr/findOnPageIconTintColor" />
+
+                                <!-- `android:background="?attr/selectableItemBackground"` adds a ripple animation on touch. -->
+                                <ImageView
+                                    android:id="@+id/close_find"
+                                    android:src="@drawable/close_day"
+                                    android:layout_width="35dp"
+                                    android:layout_height="35dp"
+                                    android:layout_marginStart="4dp"
+                                    android:layout_marginEnd="8dp"
+                                    android:layout_gravity="center_vertical"
+                                    android:background="?attr/selectableItemBackground"
+                                    android:contentDescription="@string/close"
+                                    android:onClick="closeFindOnPage"
+                                    app:tint="?attr/findOnPageIconTintColor" />
+                            </LinearLayout>
+
+                            <!-- The toolbar.  It is initially `visibility="gone"` so it doesn't display while the blocklists are loading. -->
+                            <androidx.appcompat.widget.Toolbar
+                                android:id="@+id/toolbar"
+                                android:layout_height="wrap_content"
+                                android:layout_width="match_parent"
+                                android:visibility="gone" />
+                        </com.google.android.material.appbar.AppBarLayout>
+                    </RelativeLayout>
+            </androidx.coordinatorlayout.widget.CoordinatorLayout>
+        </RelativeLayout>
+
+        <!-- The navigation drawer. -->
+        <com.google.android.material.navigation.NavigationView
+            android:id="@+id/navigationview"
+            android:layout_height="match_parent"
+            android:layout_width="wrap_content"
+            android:layout_gravity="start"
+            app:menu="@menu/webview_navigation_menu"
+            app:itemIconTint="?attr/navigationIconTintColor" />
+
+        <!-- Include the bookmarks drawer, which varies based on screen width. -->
+        <include layout="@layout/bookmarks_drawer_bottom_appbar" />
+    </androidx.drawerlayout.widget.DrawerLayout>
+
+    <!-- The full screen video frame layout is used to display full screen videos.  It is initially `android:visibility="gone"` to hide it from view. -->
+    <FrameLayout
+        android:id="@+id/full_screen_video_framelayout"
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:visibility="gone" />
+
+    <!-- The loading blocklists relative layout displays when the app first starts.  It is hidden once the blocklists are populated. -->
+    <RelativeLayout
+        android:id="@+id/loading_blocklists_relativelayout"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+        <ImageView
+            android:id="@+id/privacy_browser_logo"
+            android:layout_height="256dp"
+            android:layout_width="256dp"
+            android:layout_centerInParent="true"
+            android:src="@drawable/privacy_browser_foreground"
+            tools:ignore="contentDescription" />
+
+        <TextView
+            android:id="@+id/loading_blocklist_textview"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/privacy_browser_logo"
+            android:layout_centerHorizontal="true"
+            android:layout_margin="10dp"
+            android:textSize="16sp"
+            android:textAlignment="center"
+            android:textColor="?android:attr/textColorPrimary" />
+    </RelativeLayout>
+</FrameLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/main_framelayout_top_appbar.xml b/app/src/main/res/layout/main_framelayout_top_appbar.xml
new file mode 100644 (file)
index 0000000..fd9d426
--- /dev/null
@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2015-2017,2019-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<FrameLayout
+    android:id="@+id/root_framelayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent" >
+
+    <androidx.drawerlayout.widget.DrawerLayout
+        android:id="@+id/drawerlayout"
+        android:layout_height="match_parent"
+        android:layout_width="match_parent" >
+
+        <!-- The relative layout contains the AdView and the coordinator layout, which contains the rest of the views. -->
+        <RelativeLayout
+            android:id="@+id/main_content_relativelayout"
+            android:layout_height="match_parent"
+            android:layout_width="match_parent" >
+
+            <!-- Include the AdView.  For the standard flavor, this just includes a TextView with `visibility="gone"`. -->
+            <include layout="@layout/adview_top_appbar" />
+
+            <!-- Setting the CoordinatorLayout to be `focusableInTouchMode` prevents the URL text box from stealing focus on launch and opening the keyboard. -->
+            <androidx.coordinatorlayout.widget.CoordinatorLayout
+                android:layout_height="match_parent"
+                android:layout_width="match_parent"
+                android:layout_above="@id/adview"
+                android:focusable="true"
+                android:focusableInTouchMode="true" >
+
+                <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme.  The background is set programmatically based on the proxy status. -->
+                <com.google.android.material.appbar.AppBarLayout
+                    android:id="@+id/appbar_layout"
+                    android:layout_height="wrap_content"
+                    android:layout_width="match_parent"
+                    android:theme="@style/PrivacyBrowserAppBar" >
+
+                    <!-- The toolbar.  It is initially `visibility="gone"` so it doesn't display while the blocklists are loading. -->
+                    <androidx.appcompat.widget.Toolbar
+                        android:id="@+id/toolbar"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:visibility="gone"
+                        app:layout_scrollFlags="scroll|enterAlways|snap" />
+
+                    <!-- The find on page linear layout.  It is initially `visibility="gone"` so it doesn't display while the blocklists are loading. -->
+                    <LinearLayout
+                        android:id="@+id/find_on_page_linearlayout"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:orientation="horizontal"
+                        android:visibility="gone"
+                        app:layout_scrollFlags="scroll|enterAlways|snap" >
+
+                        <!-- `android:imeOptions="actionDone"` sets the keyboard to have a `check mark` key instead of a `new line` key. -->
+                        <EditText
+                            android:id="@+id/find_on_page_edittext"
+                            android:layout_height="wrap_content"
+                            android:layout_width="0dp"
+                            android:layout_weight="1"
+                            android:layout_marginStart="8dp"
+                            android:layout_marginEnd="4dp"
+                            android:hint="@string/find_on_page"
+                            android:lines="1"
+                            android:imeOptions="actionDone"
+                            android:inputType="text"
+                            tools:ignore="Autofill" />
+
+                        <TextView
+                            android:id="@+id/find_on_page_count_textview"
+                            android:layout_height="wrap_content"
+                            android:layout_width="wrap_content"
+                            android:layout_marginStart="4dp"
+                            android:layout_marginEnd="4dp"
+                            android:text="@string/zero_of_zero" />
+
+                        <!-- `android:background="?attr/selectableItemBackground"` adds a ripple animation on touch. -->
+                        <ImageView
+                            android:id="@+id/find_previous"
+                            android:src="@drawable/previous"
+                            android:layout_width="35dp"
+                            android:layout_height="35dp"
+                            android:layout_marginStart="4dp"
+                            android:layout_marginEnd="4dp"
+                            android:layout_gravity="center_vertical"
+                            android:background="?attr/selectableItemBackground"
+                            android:contentDescription="@string/previous"
+                            android:onClick="findPreviousOnPage"
+                            app:tint="?attr/findOnPageIconTintColor" />
+
+                        <!-- `android:background="?attr/selectableItemBackground"` adds a ripple animation on touch. -->
+                        <ImageView
+                            android:id="@+id/find_next"
+                            android:src="@drawable/next"
+                            android:layout_width="35dp"
+                            android:layout_height="35dp"
+                            android:layout_marginStart="4dp"
+                            android:layout_marginEnd="4dp"
+                            android:layout_gravity="center_vertical"
+                            android:background="?attr/selectableItemBackground"
+                            android:contentDescription="@string/next"
+                            android:onClick="findNextOnPage"
+                            app:tint="?attr/findOnPageIconTintColor" />
+
+                        <!-- `android:background="?attr/selectableItemBackground"` adds a ripple animation on touch. -->
+                        <ImageView
+                            android:id="@+id/close_find"
+                            android:src="@drawable/close_day"
+                            android:layout_width="35dp"
+                            android:layout_height="35dp"
+                            android:layout_marginStart="4dp"
+                            android:layout_marginEnd="8dp"
+                            android:layout_gravity="center_vertical"
+                            android:background="?attr/selectableItemBackground"
+                            android:contentDescription="@string/close"
+                            android:onClick="closeFindOnPage"
+                            app:tint="?attr/findOnPageIconTintColor" />
+                    </LinearLayout>
+
+                    <!-- The tab linear layout.  It sets the background to the right of the add tab button.  It is initially `visibility="gone"` so it doesn't display while the blocklists are loading. -->
+                    <LinearLayout
+                        android:id="@+id/tabs_linearlayout"
+                        android:layout_height="wrap_content"
+                        android:layout_width="wrap_content"
+                        android:orientation="horizontal"
+                        android:visibility="gone"
+                        app:layout_scrollFlags="scroll|enterAlways|snap" >
+
+                        <!-- `android:background="?attr/selectableItemBackground"` adds a ripple animation on touch. -->
+                        <ImageView
+                            android:layout_height="match_parent"
+                            android:layout_width="wrap_content"
+                            android:layout_gravity="center_vertical"
+                            android:paddingStart="10dp"
+                            android:paddingEnd="10dp"
+                            android:src="@drawable/close_day"
+                            android:background="?attr/selectableItemBackground"
+                            android:onClick="closeTab"
+                            android:contentDescription="@string/close_tab"
+                            app:tint="?attr/addTabIconTintColor" />
+
+                        <com.google.android.material.tabs.TabLayout
+                            android:id="@+id/tablayout"
+                            android:layout_height="wrap_content"
+                            android:layout_width="0dp"
+                            android:layout_weight="1"
+                            app:tabIndicatorGravity="top"
+                            app:tabMode="scrollable" />
+
+                        <!-- `android:background="?attr/selectableItemBackground"` adds a ripple animation on touch. -->
+                        <ImageView
+                            android:layout_height="match_parent"
+                            android:layout_width="wrap_content"
+                            android:layout_gravity="center_vertical"
+                            android:paddingStart="10dp"
+                            android:paddingEnd="10dp"
+                            android:src="@drawable/add"
+                            android:background="?attr/selectableItemBackground"
+                            android:onClick="addTab"
+                            android:contentDescription="@string/add_tab"
+                            app:tint="?attr/addTabIconTintColor" />
+                    </LinearLayout>
+                </com.google.android.material.appbar.AppBarLayout>
+
+                <!-- `app:layout_behavior="@string/appbar_scrolling_view_behavior"` must be set on the sibling of AppBarLayout. -->
+                <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
+                    android:id="@+id/swiperefreshlayout"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    app:layout_behavior="@string/appbar_scrolling_view_behavior" >
+
+                        <com.stoutner.privacybrowser.views.NoSwipeViewPager
+                            android:id="@+id/webviewpager"
+                            android:layout_height="match_parent"
+                            android:layout_width="match_parent" />
+                </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
+            </androidx.coordinatorlayout.widget.CoordinatorLayout>
+        </RelativeLayout>
+
+        <!-- The navigation drawer. -->
+        <com.google.android.material.navigation.NavigationView
+            android:id="@+id/navigationview"
+            android:layout_height="match_parent"
+            android:layout_width="wrap_content"
+            android:layout_gravity="start"
+            app:menu="@menu/webview_navigation_menu"
+            app:itemIconTint="?attr/navigationIconTintColor" />
+
+        <!-- Include the bookmarks drawer, which varies based on screen width. -->
+        <include layout="@layout/bookmarks_drawer_top_appbar" />
+    </androidx.drawerlayout.widget.DrawerLayout>
+
+    <!-- The full screen video frame layout is used to display full screen videos.  It is initially `android:visibility="gone"` to hide it from view. -->
+    <FrameLayout
+        android:id="@+id/full_screen_video_framelayout"
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:visibility="gone" />
+
+    <!-- The loading blocklists relative layout displays when the app first starts.  It is hidden once the blocklists are populated. -->
+    <RelativeLayout
+        android:id="@+id/loading_blocklists_relativelayout"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+        <ImageView
+            android:id="@+id/privacy_browser_logo"
+            android:layout_height="256dp"
+            android:layout_width="256dp"
+            android:layout_centerInParent="true"
+            android:src="@drawable/privacy_browser_foreground"
+            tools:ignore="contentDescription" />
+
+        <TextView
+            android:id="@+id/loading_blocklist_textview"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/privacy_browser_logo"
+            android:layout_centerHorizontal="true"
+            android:layout_margin="10dp"
+            android:textSize="16sp"
+            android:textAlignment="center"
+            android:textColor="?android:attr/textColorPrimary" />
+    </RelativeLayout>
+</FrameLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/requests_coordinatorlayout.xml b/app/src/main/res/layout/requests_coordinatorlayout.xml
deleted file mode 100644 (file)
index 7ca548f..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2018-2020 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<androidx.coordinatorlayout.widget.CoordinatorLayout
-    android:id="@+id/requests_coordinatorlayout"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_height="match_parent"
-    android:layout_width="match_parent" >
-
-    <!-- the linear layout with `orientation="vertical"` moves the content below the app bar layout. -->
-    <LinearLayout
-        android:layout_height="match_parent"
-        android:layout_width="match_parent"
-        android:orientation="vertical" >
-
-        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
-        <com.google.android.material.appbar.AppBarLayout
-            android:id="@+id/requests_appbarlayout"
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:background="?android:attr/colorBackground"
-            android:theme="@style/PrivacyBrowserAppBar" >
-
-            <androidx.appcompat.widget.Toolbar
-                android:id="@+id/requests_toolbar"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent" />
-        </com.google.android.material.appbar.AppBarLayout>
-
-        <!-- `android:dividerHeight` must be at least `1dp` or the list view is inconsistent in calculating how many bookmarks are displayed. -->
-        <ListView
-            android:id="@+id/requests_listview"
-            android:layout_height="match_parent"
-            android:layout_width="match_parent"
-            android:divider="@color/transparent"
-            android:dividerHeight="1dp" />
-    </LinearLayout>
-</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/requests_coordinatorlayout_bottom_appbar.xml b/app/src/main/res/layout/requests_coordinatorlayout_bottom_appbar.xml
new file mode 100644 (file)
index 0000000..79de233
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2018-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+    android:id="@+id/requests_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent" >
+
+    <!-- The linear layout with `orientation="vertical"` keeps the content above the app bar layout. -->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical"  >
+
+        <!-- `android:dividerHeight` must be at least `1dp` or the list view is inconsistent in calculating how many bookmarks are displayed. -->
+        <ListView
+            android:id="@+id/requests_listview"
+            android:layout_height="0dp"
+            android:layout_width="match_parent"
+            android:layout_weight="1"
+            android:divider="@color/transparent"
+            android:dividerHeight="1dp" />
+
+        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
+        <com.google.android.material.appbar.AppBarLayout
+            android:id="@+id/requests_appbarlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:background="?android:attr/colorBackground"
+            android:theme="@style/PrivacyBrowserAppBar" >
+
+            <androidx.appcompat.widget.Toolbar
+                android:id="@+id/requests_toolbar"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" />
+        </com.google.android.material.appbar.AppBarLayout>
+    </LinearLayout>
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/requests_coordinatorlayout_top_appbar.xml b/app/src/main/res/layout/requests_coordinatorlayout_top_appbar.xml
new file mode 100644 (file)
index 0000000..6a7cf46
--- /dev/null
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2018-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+    android:id="@+id/requests_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent" >
+
+    <!-- The linear layout with `orientation="vertical"` moves the content below the app bar layout. -->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical" >
+
+        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
+        <com.google.android.material.appbar.AppBarLayout
+            android:id="@+id/requests_appbarlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:background="?android:attr/colorBackground"
+            android:theme="@style/PrivacyBrowserAppBar" >
+
+            <androidx.appcompat.widget.Toolbar
+                android:id="@+id/requests_toolbar"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" />
+        </com.google.android.material.appbar.AppBarLayout>
+
+        <!-- `android:dividerHeight` must be at least `1dp` or the list view is inconsistent in calculating how many bookmarks are displayed. -->
+        <ListView
+            android:id="@+id/requests_listview"
+            android:layout_height="match_parent"
+            android:layout_width="match_parent"
+            android:divider="@color/transparent"
+            android:dividerHeight="1dp" />
+    </LinearLayout>
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/view_source_coordinatorlayout.xml b/app/src/main/res/layout/view_source_coordinatorlayout.xml
deleted file mode 100644 (file)
index 5fd4566..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2017-2021 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<!-- Setting the layout root to be `focusableInTouchMode` prevents the URL toolbar from stealing focus on launch and opening the keyboard. -->
-<androidx.coordinatorlayout.widget.CoordinatorLayout
-    android:id="@+id/view_source_coordinatorlayout"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_height="match_parent"
-    android:layout_width="match_parent"
-    android:focusable="true"
-    android:focusableInTouchMode="true" >
-
-    <!-- The linear layout with `orientation="vertical"` moves the content below the app bar layout. -->
-    <LinearLayout
-        android:layout_height="match_parent"
-        android:layout_width="match_parent"
-        android:orientation="vertical" >
-
-        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
-        <com.google.android.material.appbar.AppBarLayout
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:background="?android:attr/colorBackground"
-            android:theme="@style/PrivacyBrowserAppBar" >
-
-            <!-- The frame layout allows the toolbar and the progress bar to occupy the same space. -->
-            <FrameLayout
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent" >
-
-                <androidx.appcompat.widget.Toolbar
-                    android:id="@+id/view_source_toolbar"
-                    android:layout_height="wrap_content"
-                    android:layout_width="match_parent" />
-
-                <!-- Android automatically uses a different, skinnier drawable with padding for indeterminate horizontal progress bars in API >= 21.
-                    They make this very difficult to override.  https://redmine.stoutner.com/issues/241
-                    `tools:ignore="UnusedAttribute"` removes the lint warning about `progressTint` and `progressBackgroundTint` not applying to API < 21. -->
-                <ProgressBar
-                    android:id="@+id/progress_bar"
-                    style="?android:attr/progressBarStyleHorizontal"
-                    android:layout_height="wrap_content"
-                    android:layout_width="match_parent"
-                    android:minHeight="3dp"
-                    android:layout_gravity="bottom"
-                    android:visibility="gone"
-                    tools:ignore="UnusedAttribute" />
-            </FrameLayout>
-        </com.google.android.material.appbar.AppBarLayout>
-
-        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
-            android:id="@+id/view_source_swiperefreshlayout"
-            android:layout_height="match_parent"
-            android:layout_width="match_parent">
-
-            <ScrollView
-                android:id="@+id/view_source_scrollview"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent" >
-
-                <LinearLayout
-                    android:layout_height="wrap_content"
-                    android:layout_width="match_parent"
-                    android:orientation="vertical"
-                    android:layout_margin="10dp" >
-
-                    <!-- Request headers. -->
-                    <TextView
-                        android:id="@+id/request_headers_title_textview"
-                        android:layout_height="wrap_content"
-                        android:layout_width="match_parent"
-                        android:text="@string/request_headers"
-                        android:textAlignment="center"
-                        android:textSize="18sp"
-                        android:textColor="?attr/blueTextColor"
-                        android:textStyle="bold" />
-
-                    <TextView
-                        android:id="@+id/request_headers_textview"
-                        android:layout_height="wrap_content"
-                        android:layout_width="match_parent"
-                        android:textIsSelectable="true"
-                        android:layout_marginBottom="8dp" />
-
-                    <!-- Response message. -->
-                    <TextView
-                        android:id="@+id/response_message_title_textview"
-                        android:layout_height="wrap_content"
-                        android:layout_width="match_parent"
-                        android:text="@string/response_message"
-                        android:textAlignment="center"
-                        android:textSize="18sp"
-                        android:textColor="?attr/blueTextColor"
-                        android:textStyle="bold" />
-
-                    <TextView
-                        android:id="@+id/response_message_textview"
-                        android:layout_height="wrap_content"
-                        android:layout_width="match_parent"
-                        android:textIsSelectable="true"
-                        android:layout_marginBottom="8dp" />
-
-                    <!-- Response headers. -->
-                    <!-- The title text is set programatically. -->
-                    <TextView
-                        android:id="@+id/response_headers_title_textivew"
-                        android:layout_height="wrap_content"
-                        android:layout_width="match_parent"
-                        android:textAlignment="center"
-                        android:textSize="18sp"
-                        android:textColor="?attr/blueTextColor"
-                        android:textStyle="bold" />
-
-                    <TextView
-                        android:id="@+id/response_headers_textview"
-                        android:layout_height="wrap_content"
-                        android:layout_width="match_parent"
-                        android:textIsSelectable="true"
-                        android:layout_marginBottom="8dp" />
-
-                    <!-- Response body. -->
-                    <!-- The title text is set programatically. -->
-                    <TextView
-                        android:id="@+id/response_body_title_textview"
-                        android:layout_height="wrap_content"
-                        android:layout_width="match_parent"
-                        android:textAlignment="center"
-                        android:textSize="18sp"
-                        android:textColor="?attr/blueTextColor"
-                        android:textStyle="bold" />
-
-                    <TextView
-                        android:id="@+id/response_body_textview"
-                        android:layout_height="wrap_content"
-                        android:layout_width="match_parent"
-                        android:textIsSelectable="true" />
-                </LinearLayout>
-            </ScrollView>
-        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
-    </LinearLayout>
-</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/view_source_coordinatorlayout_bottom_appbar.xml b/app/src/main/res/layout/view_source_coordinatorlayout_bottom_appbar.xml
new file mode 100644 (file)
index 0000000..bb11593
--- /dev/null
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2017-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<!-- Setting the layout root to be `focusableInTouchMode` prevents the URL toolbar from stealing focus on launch and opening the keyboard. -->
+<androidx.coordinatorlayout.widget.CoordinatorLayout android:id="@+id/view_source_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent"
+    android:focusable="true"
+    android:focusableInTouchMode="true"
+    xmlns:app="http://schemas.android.com/apk/res-auto">
+
+    <!-- The linear layout with `orientation="vertical"` keeps the content above the app bar layout.  `app:layout_dodgeInsetEdges="bottom"` as a child of a coordinator layout moves the view above snackbars. -->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical"
+        app:layout_dodgeInsetEdges="bottom" >
+
+        <!-- `android:layout_weight="1"` causes the swipe refresh layout to fill all the remaining space. -->
+        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
+            android:id="@+id/view_source_swiperefreshlayout"
+            android:layout_height="0dp"
+            android:layout_width="match_parent"
+            android:layout_weight="1">
+
+            <ScrollView
+                android:id="@+id/view_source_scrollview"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" >
+
+                <LinearLayout
+                    android:layout_height="wrap_content"
+                    android:layout_width="match_parent"
+                    android:orientation="vertical"
+                    android:layout_margin="10dp" >
+
+                    <!-- Request headers. -->
+                    <TextView
+                        android:id="@+id/request_headers_title_textview"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:text="@string/request_headers"
+                        android:textAlignment="center"
+                        android:textSize="18sp"
+                        android:textColor="?attr/blueTextColor"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:id="@+id/request_headers_textview"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:textIsSelectable="true"
+                        android:layout_marginBottom="8dp" />
+
+                    <!-- Response message. -->
+                    <TextView
+                        android:id="@+id/response_message_title_textview"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:text="@string/response_message"
+                        android:textAlignment="center"
+                        android:textSize="18sp"
+                        android:textColor="?attr/blueTextColor"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:id="@+id/response_message_textview"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:textIsSelectable="true"
+                        android:layout_marginBottom="8dp" />
+
+                    <!-- Response headers. -->
+                    <!-- The title text is set programatically. -->
+                    <TextView
+                        android:id="@+id/response_headers_title_textivew"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:textAlignment="center"
+                        android:textSize="18sp"
+                        android:textColor="?attr/blueTextColor"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:id="@+id/response_headers_textview"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:textIsSelectable="true"
+                        android:layout_marginBottom="8dp" />
+
+                    <!-- Response body. -->
+                    <!-- The title text is set programatically. -->
+                    <TextView
+                        android:id="@+id/response_body_title_textview"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:textAlignment="center"
+                        android:textSize="18sp"
+                        android:textColor="?attr/blueTextColor"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:id="@+id/response_body_textview"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:textIsSelectable="true" />
+                </LinearLayout>
+            </ScrollView>
+        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
+
+        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
+        <com.google.android.material.appbar.AppBarLayout
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:background="?android:attr/colorBackground"
+            android:theme="@style/PrivacyBrowserAppBar" >
+
+            <!-- The frame layout allows the toolbar and the progress bar to occupy the same space. -->
+            <FrameLayout
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" >
+
+                <androidx.appcompat.widget.Toolbar
+                    android:id="@+id/view_source_toolbar"
+                    android:layout_height="wrap_content"
+                    android:layout_width="match_parent" />
+
+                <!-- Android automatically uses a different, skinnier drawable with padding for indeterminate horizontal progress bars in API >= 21.
+                    They make this very difficult to override.  https://redmine.stoutner.com/issues/241
+                    `tools:ignore="UnusedAttribute"` removes the lint warning about `progressTint` and `progressBackgroundTint` not applying to API < 21. -->
+                <ProgressBar
+                    android:id="@+id/progress_bar"
+                    style="?android:attr/progressBarStyleHorizontal"
+                    android:layout_height="wrap_content"
+                    android:layout_width="match_parent"
+                    android:minHeight="3dp"
+                    android:layout_gravity="bottom"
+                    android:visibility="gone"
+                    tools:ignore="UnusedAttribute" />
+            </FrameLayout>
+        </com.google.android.material.appbar.AppBarLayout>
+    </LinearLayout>
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/view_source_coordinatorlayout_top_appbar.xml b/app/src/main/res/layout/view_source_coordinatorlayout_top_appbar.xml
new file mode 100644 (file)
index 0000000..5fd4566
--- /dev/null
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2017-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<!-- Setting the layout root to be `focusableInTouchMode` prevents the URL toolbar from stealing focus on launch and opening the keyboard. -->
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+    android:id="@+id/view_source_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent"
+    android:focusable="true"
+    android:focusableInTouchMode="true" >
+
+    <!-- The linear layout with `orientation="vertical"` moves the content below the app bar layout. -->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical" >
+
+        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
+        <com.google.android.material.appbar.AppBarLayout
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:background="?android:attr/colorBackground"
+            android:theme="@style/PrivacyBrowserAppBar" >
+
+            <!-- The frame layout allows the toolbar and the progress bar to occupy the same space. -->
+            <FrameLayout
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" >
+
+                <androidx.appcompat.widget.Toolbar
+                    android:id="@+id/view_source_toolbar"
+                    android:layout_height="wrap_content"
+                    android:layout_width="match_parent" />
+
+                <!-- Android automatically uses a different, skinnier drawable with padding for indeterminate horizontal progress bars in API >= 21.
+                    They make this very difficult to override.  https://redmine.stoutner.com/issues/241
+                    `tools:ignore="UnusedAttribute"` removes the lint warning about `progressTint` and `progressBackgroundTint` not applying to API < 21. -->
+                <ProgressBar
+                    android:id="@+id/progress_bar"
+                    style="?android:attr/progressBarStyleHorizontal"
+                    android:layout_height="wrap_content"
+                    android:layout_width="match_parent"
+                    android:minHeight="3dp"
+                    android:layout_gravity="bottom"
+                    android:visibility="gone"
+                    tools:ignore="UnusedAttribute" />
+            </FrameLayout>
+        </com.google.android.material.appbar.AppBarLayout>
+
+        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
+            android:id="@+id/view_source_swiperefreshlayout"
+            android:layout_height="match_parent"
+            android:layout_width="match_parent">
+
+            <ScrollView
+                android:id="@+id/view_source_scrollview"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent" >
+
+                <LinearLayout
+                    android:layout_height="wrap_content"
+                    android:layout_width="match_parent"
+                    android:orientation="vertical"
+                    android:layout_margin="10dp" >
+
+                    <!-- Request headers. -->
+                    <TextView
+                        android:id="@+id/request_headers_title_textview"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:text="@string/request_headers"
+                        android:textAlignment="center"
+                        android:textSize="18sp"
+                        android:textColor="?attr/blueTextColor"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:id="@+id/request_headers_textview"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:textIsSelectable="true"
+                        android:layout_marginBottom="8dp" />
+
+                    <!-- Response message. -->
+                    <TextView
+                        android:id="@+id/response_message_title_textview"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:text="@string/response_message"
+                        android:textAlignment="center"
+                        android:textSize="18sp"
+                        android:textColor="?attr/blueTextColor"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:id="@+id/response_message_textview"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:textIsSelectable="true"
+                        android:layout_marginBottom="8dp" />
+
+                    <!-- Response headers. -->
+                    <!-- The title text is set programatically. -->
+                    <TextView
+                        android:id="@+id/response_headers_title_textivew"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:textAlignment="center"
+                        android:textSize="18sp"
+                        android:textColor="?attr/blueTextColor"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:id="@+id/response_headers_textview"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:textIsSelectable="true"
+                        android:layout_marginBottom="8dp" />
+
+                    <!-- Response body. -->
+                    <!-- The title text is set programatically. -->
+                    <TextView
+                        android:id="@+id/response_body_title_textview"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:textAlignment="center"
+                        android:textSize="18sp"
+                        android:textColor="?attr/blueTextColor"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:id="@+id/response_body_textview"
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        android:textIsSelectable="true" />
+                </LinearLayout>
+            </ScrollView>
+        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
+    </LinearLayout>
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
index 7c0ae131884e8a4aa6e70ccd17e89f5022202506..5c4e2f66c0749577000d638a22429ce76ff5cdc8 100644 (file)
     <string name="response_message">Message de la réponse</string>
     <string name="response_headers">En-tête de la réponse</string>
     <string name="response_body">Corps de la réponse</string>
+    <string name="content_metadata">Métadonnées du contenu</string>
+    <string name="content_data">Données du contenu</string>
+    <string name="untrusted_ssl_certificate">Le certificat SSL n\'est pas fiable.</string>
+    <string name="load_anyway">Charger quand même</string>
     <string name="about_view_source">A propos View Source</string>
     <string name="about_view_source_message">Puisqu\'Android Webview ne permet pas de révêler l\'information source,
         une requête séparée a été effectuée en utilisant les outils sytèmes afin d\'afficher ce qui est présenté à l\'écran
index ef8831ef94d0e4ffa23b5b7833919a49e2bf48c7..2e487e596af84c0798b59a93d94c09f2e0902c19 100644 (file)
@@ -23,7 +23,6 @@
         <!-- Main Items. -->
         <item name="android:statusBarColor">?android:attr/colorBackground</item>
         <item name="android:windowLightStatusBar">false</item>
-        <item name="windowActionModeOverlay">true</item>  <!-- `windowActionModeOverlay` makes the contextual app bar cover the support app bar. -->
 
         <!-- Colors.  -->
         <item name="android:actionModeBackground">?android:attr/colorBackground</item>
index 188c005d7eac9b7bae9edae541738a3f75281309..a11d63716345719c9ab38d5b68211ca8a9e3ef5f 100644 (file)
@@ -25,7 +25,6 @@
         <item name="android:statusBarColor">?android:attr/colorBackground</item>
         <item name="android:windowLightNavigationBar">false</item>
         <item name="android:windowLightStatusBar">false</item>
-        <item name="windowActionModeOverlay">true</item>  <!-- `windowActionModeOverlay` makes the contextual app bar cover the support app bar. -->
 
         <!-- Colors.  -->
         <item name="android:actionModeBackground">?android:attr/colorBackground</item>
index 0de44f4027f355fa86ebfb710eb367ae1da01a10..d940112db531616a5070f3c5154e323735990d7c 100644 (file)
@@ -20,9 +20,6 @@
 
 <resources>
     <style name="PrivacyBrowser" parent="Theme.AppCompat.DayNight.NoActionBar" >
-        <!-- Main Items. -->
-        <item name="windowActionModeOverlay">true</item>  <!-- `windowActionModeOverlay` makes the contextual app bar cover the support app bar. -->
-
         <!-- Colors.  -->
         <item name="android:actionModeBackground">?android:attr/colorBackground</item>
         <item name="android:textColorHighlight">@color/violet_700</item>
index 4ca8d7c81048c60207fa5bed7d45828f03efec54..78403a3c1e7f8b0a11ac1531a1c2b8c370ac47f8 100644 (file)
     <string name="response_body">Corpo de Resposta</string>
     <string name="content_metadata">Metadados de conteúdo</string>
     <string name="content_data">Dados de conteúdo</string>
+    <string name="untrusted_ssl_certificate">O certificado SSL é suspeito.</string>
+    <string name="load_anyway">Carregar mesmo assim</string>
     <string name="about_view_source">Sobre Ver Fonte</string>
     <string name="about_view_source_message">Como o WebView do Android não expõe as informações de origem,
         uma solicitação separada foi feita usando ferramentas do sistema para reunir as informações exibidas nesta atividade.
index 1844f98c055236da7886c9b56961d38b4b6688ad..94734222e558aae08e8f32bd9caf2bf36ad6042d 100644 (file)
@@ -23,7 +23,6 @@
         <!-- Main Items. -->
         <item name="android:statusBarColor">?android:attr/colorBackground</item>
         <item name="android:windowLightStatusBar">true</item>
-        <item name="windowActionModeOverlay">true</item>  <!-- `windowActionModeOverlay` makes the contextual app bar cover the support app bar. -->
 
         <!-- Colors. -->
         <item name="android:actionModeBackground">?android:attr/colorBackground</item>
index 03e5e695648a6589ecba55a0528035c36c15fcd2..34da5360b39eb091cc42fbfe6087a4c1261fe31c 100644 (file)
@@ -25,7 +25,6 @@
         <item name="android:statusBarColor">?android:attr/colorBackground</item>
         <item name="android:windowLightNavigationBar">true</item>
         <item name="android:windowLightStatusBar">true</item>
-        <item name="windowActionModeOverlay">true</item>  <!-- `windowActionModeOverlay` makes the contextual app bar cover the support app bar. -->
 
         <!-- Colors. -->
         <item name="android:actionModeBackground">?android:attr/colorBackground</item>
index 2afa9243cd28f4fbe4cc73d7bc45c19a4ab54301..bdf37f6fc186d61fbae05cbad9ce7f02c9f2d501 100644 (file)
         <string name="download_with_external_app_summary">Use an external app to download files.</string>
         <string name="scroll_app_bar">Scroll the app bar</string>
         <string name="scroll_app_bar_summary">Scroll the app bar off the top of the screen when the WebView scrolls down.</string>
+        <string name="bottom_app_bar">Bottom app bar</string>
+        <string name="bottom_app_bar_summary">Move the app bar to the bottom of the screen.  Changing this setting will restart Privacy Browser.</string>
         <string name="display_additional_app_bar_icons">Display additional app bar icons</string>
         <string name="display_additional_app_bar_icons_summary">Display icons in the app bar for refreshing the WebView and, if there is room, for opening the bookmarks drawer and toggling cookies.</string>
         <string name="app_theme">App theme</string>
         <string name="display_webpage_images_summary">Disable to conserve bandwidth.</string>
 
     <!-- Non-translatable preference keys. -->
-    <string name="cookies_key" translatable="false">cookies</string>
     <string name="allow_screenshots_key" translatable="false">allow_screenshots</string>
+    <string name="bottom_app_bar_key" translatable="false">bottom_app_bar</string>
+    <string name="cookies_key" translatable="false">cookies</string>
     <string name="clear_logcat_key" translatable="false">clear_logcat</string>
     <string name="download_with_external_app_key" translatable="false">download_with_external_app</string>
     <string name="display_additional_app_bar_icons_key" translatable="false">display_additional_app_bar_icons</string>
index 5c47d125ec83cd11172d0b7dabc5e51e507672aa..28ab21d24a7d865519ec2f3d3072cdd340774a16 100644 (file)
@@ -20,9 +20,6 @@
 
 <resources>
     <style name="PrivacyBrowser" parent="Theme.AppCompat.DayNight.NoActionBar" >
-        <!-- Main Items. -->
-        <item name="windowActionModeOverlay">true</item>  <!-- `windowActionModeOverlay` makes the contextual app bar cover the support app bar. -->
-
         <!-- Colors. -->
         <item name="android:actionModeBackground">?android:attr/colorBackground</item>
         <item name="android:textColorHighlight">@color/blue_200</item>
index 5d4e80cc3b5ecb4d3832f35c623065c1f89ef772..4d1d5086be5e3acf2c32efad9c9c60c30c63ea76 100644 (file)
             android:summary="@string/scroll_app_bar_summary"
             android:defaultValue="true" />
 
+        <SwitchPreference
+            android:key="bottom_app_bar"
+            android:title="@string/bottom_app_bar"
+            android:summary="@string/bottom_app_bar_summary"
+            android:defaultValue="false" />
+
         <SwitchPreference
             android:key="display_additional_app_bar_icons"
             android:title="@string/display_additional_app_bar_icons"