]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
Impliment scrolling of the app bar. https://redmine.stoutner.com/issues/8
authorSoren Stoutner <soren@stoutner.com>
Sat, 23 Feb 2019 04:01:23 +0000 (21:01 -0700)
committerSoren Stoutner <soren@stoutner.com>
Sat, 23 Feb 2019 04:01:23 +0000 (21:01 -0700)
62 files changed:
.idea/assetWizardSettings.xml
.idea/misc.xml
app/src/free/java/com/stoutner/privacybrowser/helpers/AdHelper.java
app/src/free/res/layout/adview.xml [new file with mode: 0644]
app/src/free/res/layout/main_webview.xml [deleted file]
app/src/main/assets/de/about_licenses_dark.html
app/src/main/assets/de/about_licenses_light.html
app/src/main/assets/en/about_licenses_dark.html
app/src/main/assets/en/about_licenses_light.html
app/src/main/assets/es/about_licenses_dark.html
app/src/main/assets/es/about_licenses_light.html
app/src/main/assets/it/about_licenses_dark.html
app/src/main/assets/it/about_licenses_light.html
app/src/main/assets/ru/about_licenses_dark.html
app/src/main/assets/ru/about_licenses_light.html
app/src/main/assets/shared_images/call_to_action_dark.png [deleted file]
app/src/main/assets/shared_images/call_to_action_light.png [deleted file]
app/src/main/assets/shared_images/fullscreen_dark.png [deleted file]
app/src/main/assets/shared_images/fullscreen_light.png [deleted file]
app/src/main/assets/shared_images/payment_dark.png [new file with mode: 0644]
app/src/main/assets/shared_images/payment_light.png [new file with mode: 0644]
app/src/main/assets/tr/about_licenses_dark.html
app/src/main/assets/tr/about_licenses_light.html
app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java
app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java
app/src/main/java/com/stoutner/privacybrowser/helpers/ImportExportDatabaseHelper.java
app/src/main/java/com/stoutner/privacybrowser/views/NestedScrollWebView.java
app/src/main/res/drawable/app_bar_disabled_dark.xml [new file with mode: 0644]
app/src/main/res/drawable/app_bar_disabled_light.xml [new file with mode: 0644]
app/src/main/res/drawable/app_bar_enabled_dark.xml [new file with mode: 0644]
app/src/main/res/drawable/app_bar_enabled_light.xml [new file with mode: 0644]
app/src/main/res/drawable/app_bar_ghosted_dark.xml [new file with mode: 0644]
app/src/main/res/drawable/app_bar_ghosted_light.xml [new file with mode: 0644]
app/src/main/res/drawable/full_screen_disabled_dark.xml
app/src/main/res/drawable/full_screen_disabled_light.xml
app/src/main/res/drawable/full_screen_enabled_dark.xml
app/src/main/res/drawable/full_screen_enabled_light.xml
app/src/main/res/drawable/hide_system_bars_disabled_dark.xml [deleted file]
app/src/main/res/drawable/hide_system_bars_disabled_light.xml [deleted file]
app/src/main/res/drawable/hide_system_bars_enabled_dark.xml [deleted file]
app/src/main/res/drawable/hide_system_bars_enabled_light.xml [deleted file]
app/src/main/res/drawable/hide_system_bars_ghosted_dark.xml [deleted file]
app/src/main/res/drawable/hide_system_bars_ghosted_light.xml [deleted file]
app/src/main/res/drawable/translucent_bar_disabled_dark.xml [deleted file]
app/src/main/res/drawable/translucent_bar_disabled_light.xml [deleted file]
app/src/main/res/drawable/translucent_bar_enabled_dark.xml [deleted file]
app/src/main/res/drawable/translucent_bar_enabled_light.xml [deleted file]
app/src/main/res/drawable/translucent_bar_ghosted_dark.xml [deleted file]
app/src/main/res/drawable/translucent_bar_ghosted_light.xml [deleted file]
app/src/main/res/layout-w900dp/bookmarks_drawer.xml
app/src/main/res/layout/adview.xml [new file with mode: 0644]
app/src/main/res/layout/bookmarks_drawer.xml
app/src/main/res/layout/find_on_page_app_bar.xml [deleted file]
app/src/main/res/layout/main_drawerlayout.xml [deleted file]
app/src/main/res/layout/main_framelayout.xml [new file with mode: 0644]
app/src/main/res/layout/main_webview.xml [deleted file]
app/src/main/res/values-es/strings.xml
app/src/main/res/values-it/strings.xml
app/src/main/res/values-ru/strings.xml
app/src/main/res/values-tr/strings.xml
app/src/main/res/values/strings.xml
app/src/main/res/xml/preferences.xml

index 7958d0d2fe07baf8bb810153f5265d81459398b0..a2c18eb6ed7be02627a6e4e1ce48662331a3d305 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_design_icons/content/ic_save_black_24dp.xml" />
+                                      <entry key="url" value="jar:file:/home/soren/Android/android-studio/plugins/android/lib/android.jar!/images/material_design_icons/action/ic_payment_black_24dp.xml" />
                                     </map>
                                   </option>
                                 </PersistentState>
@@ -78,8 +78,7 @@
                         </option>
                         <option name="values">
                           <map>
-                            <entry key="autoMirrored" value="true" />
-                            <entry key="outputName" value="save_dark" />
+                            <entry key="outputName" value="app_bar" />
                             <entry key="sourceFile" value="$USER_HOME$/ownCloud/Android/Privacy Browser/Icons/Icons/file_copy_light.svg" />
                           </map>
                         </option>
index 75dac502959ec4f6e5232282499067f85aa716f5..419007b08c0df821c2955d4326d7956c0e20c65a 100644 (file)
@@ -2,24 +2,35 @@
 <project version="4">
   <component name="NullableNotNullManager">
     <option name="myDefaultNullable" value="android.support.annotation.Nullable" />
-    <option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
+    <option name="myDefaultNotNull" value="androidx.annotation.NonNull" />
     <option name="myNullables">
       <value>
-        <list size="4">
+        <list size="10">
           <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
           <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
           <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
           <item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
+          <item index="4" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
+          <item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
+          <item index="6" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
+          <item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" />
+          <item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableDecl" />
+          <item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" />
         </list>
       </value>
     </option>
     <option name="myNotNulls">
       <value>
-        <list size="4">
+        <list size="9">
           <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
           <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
           <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
           <item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
+          <item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
+          <item index="5" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
+          <item index="6" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
+          <item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullDecl" />
+          <item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullType" />
         </list>
       </value>
     </option>
index c3aae5d4acdf50a01b3036e413bb13de96f238ae..60f22aaccc91bd9e5d4d3402b4057a25ad7d6ed5 100644 (file)
@@ -71,7 +71,7 @@ public class AdHelper {
         // Cast the generic view to an AdView.
         AdView adView = (AdView) view;
 
-        // Save the layout parameters.  They are used when programatically recreating the add below.
+        // Save the layout parameters.  They are used when programatically recreating the ad below.
         RelativeLayout.LayoutParams adViewLayoutParameters = (RelativeLayout.LayoutParams) adView.getLayoutParams();
 
         // Remove the AdView.
diff --git a/app/src/free/res/layout/adview.xml b/app/src/free/res/layout/adview.xml
new file mode 100644 (file)
index 0000000..28d09ac
--- /dev/null
@@ -0,0 +1,29 @@
+<?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/>. -->
+
+<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:adSize="SMART_BANNER"
+    ads:adUnitId="@string/ad_unit_id" />
\ No newline at end of file
diff --git a/app/src/free/res/layout/main_webview.xml b/app/src/free/res/layout/main_webview.xml
deleted file mode 100644 (file)
index 53fd465..0000000
+++ /dev/null
@@ -1,58 +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/>. -->
-
-<!-- `android:layout_weight="1"` sets the `RelativeLayout` to fill the rest of the screen because it is encapsulated in a `LinearLayout` with `android:orientation="vertical"`.-->
-<!-- `android:background=@color/gray_900` sets the background color that is displayed when a website is loading in night mode. -->
-<RelativeLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    xmlns:ads="http://schemas.android.com/apk/res-auto"
-    android:layout_width="match_parent"
-    android:layout_height="0dp"
-    android:layout_weight="1"
-    android:background="@color/gray_900"
-    tools:context="com.stoutner.privacybrowser.activities.MainWebViewActivity"
-    tools:showIn="@layout/main_drawerlayout" >
-
-    <com.google.android.gms.ads.AdView
-        android:id="@+id/adview"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_centerHorizontal="true"
-        android:layout_alignParentBottom="true"
-        ads:adSize="SMART_BANNER"
-        ads:adUnitId="@string/ad_unit_id" >
-    </com.google.android.gms.ads.AdView>
-
-    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
-        android:id="@+id/swiperefreshlayout"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_above="@id/adview" >
-
-        <!-- Google does not currently want to support hiding the AppBar on scroll for a WebView child with the Support Toolbar.  https://code.google.com/p/android/issues/detail?id=200394 -->
-        <WebView
-            android:id="@+id/main_webview"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:focusable="true"
-            android:focusableInTouchMode="true" />
-    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
-</RelativeLayout>
\ No newline at end of file
index 3b458ae2845424f47de5028c74b476491b885f84..6b5bed0363783b49f5cecfc1988135df92cacd1a 100644 (file)
         <p><img class="icon" src="../shared_images/arrow_forward_dark.png"> arrow_forward.</p>
         <p><img class="icon" src="../shared_images/bookmarks_dark.png"> bookmarks.</p>
         <p><img class="icon" src="../shared_images/bug_report_dark.png"> bug_report.</p>
-        <p><img class="icon" src="../shared_images/call_to_action_dark.png"> call_to_action.</p>
         <p><img class="icon" src="../shared_images/camera_enhance_dark.png"> camera_enhance.</p>
         <p><img class="icon" src="../shared_images/chrome_reader_mode_dark.png"> chrome_reader_mode.</p>
         <p><img class="icon" src="../shared_images/close_dark.png"> close.</p>
         <p><img class="icon" src="../shared_images/file_download_dark.png"> file_download.</p>
         <p><img class="icon" src="../shared_images/find_in_page_dark.png"> find_in_page.</p>
         <p><img class="icon" src="../shared_images/folder_dark.png"> folder.</p>
-        <p><img class="icon" src="../shared_images/fullscreen_dark.png"> fullscreen.</p>
         <p><img class="icon" src="../shared_images/home_dark.png"> home.</p>
         <p><img class="icon" src="../shared_images/image_dark.png"> image.</p>
         <p><img class="icon" src="../shared_images/import_contacts_dark.png"> import_contacts.</p>
         <p><img class="icon" src="../shared_images/map_dark.png"> map.</p>
         <p><img class="icon" src="../shared_images/more_dark.png"> more.</p>
         <p><img class="icon" src="../shared_images/new_releases_dark.png"> new releases.</p>
+        <p><img class="icon" src="../shared_images/payment_dark.png"> payment.</p>
         <p><img class="icon" src="../shared_images/question_answer_dark.png"> question_answer.</p>
         <p><img class="icon" src="../shared_images/refresh_dark.png"> refresh.</p>
         <p><img class="icon" src="../shared_images/save_dark.png"> save.</p>
index 6df4e5235a02236d99f706c69e74692eed36c36d..3d4fdb3cfb77c06d8c8a750a6aa8982668c5753e 100644 (file)
         <p><img class="icon" src="../shared_images/arrow_forward_light.png"> arrow_forward.</p>
         <p><img class="icon" src="../shared_images/bookmarks_light.png"> bookmarks.</p>
         <p><img class="icon" src="../shared_images/bug_report_light.png"> bug_report.</p>
-        <p><img class="icon" src="../shared_images/call_to_action_light.png"> call_to_action.</p>
         <p><img class="icon" src="../shared_images/camera_enhance_light.png"> camera_enhance.</p>
         <p><img class="icon" src="../shared_images/chrome_reader_mode_light.png"> chrome_reader_mode.</p>
         <p><img class="icon" src="../shared_images/close_light.png"> close.</p>
         <p><img class="icon" src="../shared_images/file_download_light.png"> file_download.</p>
         <p><img class="icon" src="../shared_images/find_in_page_light.png"> find_in_page.</p>
         <p><img class="icon" src="../shared_images/folder_light.png"> folder.</p>
-        <p><img class="icon" src="../shared_images/fullscreen_light.png"> fullscreen.</p>
         <p><img class="icon" src="../shared_images/home_light.png"> home.</p>
         <p><img class="icon" src="../shared_images/image_light.png"> image.</p>
         <p><img class="icon" src="../shared_images/import_contacts_light.png"> import_contacts.</p>
         <p><img class="icon" src="../shared_images/map_light.png"> map.</p>
         <p><img class="icon" src="../shared_images/more_light.png"> more.</p>
         <p><img class="icon" src="../shared_images/new_releases_light.png"> new releases.</p>
+        <p><img class="icon" src="../shared_images/payment_light.png"> payment.</p>
         <p><img class="icon" src="../shared_images/question_answer_light.png"> question_answer.</p>
         <p><img class="icon" src="../shared_images/refresh_light.png"> refresh.</p>
         <p><img class="icon" src="../shared_images/save_light.png"> save.</p>
index fb7fb8a5cd0fcfc5b108225ad217d4b7d950e0d1..296d35677074ba57f1c9a5978d9d10f8d2fc84e9 100644 (file)
@@ -99,7 +99,6 @@
         <p><img class="icon" src="../shared_images/arrow_forward_dark.png"> arrow_forward.</p>
         <p><img class="icon" src="../shared_images/bookmarks_dark.png"> bookmarks.</p>
         <p><img class="icon" src="../shared_images/bug_report_dark.png"> bug_report.</p>
-        <p><img class="icon" src="../shared_images/call_to_action_dark.png"> call_to_action.</p>
         <p><img class="icon" src="../shared_images/camera_enhance_dark.png"> camera_enhance.</p>
         <p><img class="icon" src="../shared_images/chrome_reader_mode_dark.png"> chrome_reader_mode.</p>
         <p><img class="icon" src="../shared_images/close_dark.png"> close.</p>
         <p><img class="icon" src="../shared_images/file_download_dark.png"> file_download.</p>
         <p><img class="icon" src="../shared_images/find_in_page_dark.png"> find_in_page.</p>
         <p><img class="icon" src="../shared_images/folder_dark.png"> folder.</p>
-        <p><img class="icon" src="../shared_images/fullscreen_dark.png"> fullscreen.</p>
         <p><img class="icon" src="../shared_images/home_dark.png"> home.</p>
         <p><img class="icon" src="../shared_images/image_dark.png"> image.</p>
         <p><img class="icon" src="../shared_images/import_contacts_dark.png"> import_contacts.</p>
         <p><img class="icon" src="../shared_images/map_dark.png"> map.</p>
         <p><img class="icon" src="../shared_images/more_dark.png"> more.</p>
         <p><img class="icon" src="../shared_images/new_releases_dark.png"> new releases.</p>
+        <p><img class="icon" src="../shared_images/payment_dark.png"> payment.</p>
         <p><img class="icon" src="../shared_images/question_answer_dark.png"> question_answer.</p>
         <p><img class="icon" src="../shared_images/refresh_dark.png"> refresh.</p>
         <p><img class="icon" src="../shared_images/save_dark.png"> save.</p>
index 2afc962875b7b457458a3a10c6b7583acf095661..1a29f13904683f86d28060205958b25668b037f6 100644 (file)
         <p><img class="icon" src="../shared_images/arrow_forward_light.png"> arrow_forward.</p>
         <p><img class="icon" src="../shared_images/bookmarks_light.png"> bookmarks.</p>
         <p><img class="icon" src="../shared_images/bug_report_light.png"> bug_report.</p>
-        <p><img class="icon" src="../shared_images/call_to_action_light.png"> call_to_action.</p>
         <p><img class="icon" src="../shared_images/camera_enhance_light.png"> camera_enhance.</p>
         <p><img class="icon" src="../shared_images/chrome_reader_mode_light.png"> chrome_reader_mode.</p>
         <p><img class="icon" src="../shared_images/close_light.png"> close.</p>
         <p><img class="icon" src="../shared_images/file_download_light.png"> file_download.</p>
         <p><img class="icon" src="../shared_images/find_in_page_light.png"> find_in_page.</p>
         <p><img class="icon" src="../shared_images/folder_light.png"> folder.</p>
-        <p><img class="icon" src="../shared_images/fullscreen_light.png"> fullscreen.</p>
         <p><img class="icon" src="../shared_images/home_light.png"> home.</p>
         <p><img class="icon" src="../shared_images/image_light.png"> image.</p>
         <p><img class="icon" src="../shared_images/import_contacts_light.png"> import_contacts.</p>
         <p><img class="icon" src="../shared_images/map_light.png"> map.</p>
         <p><img class="icon" src="../shared_images/more_light.png"> more.</p>
         <p><img class="icon" src="../shared_images/new_releases_light.png"> new releases.</p>
+        <p><img class="icon" src="../shared_images/payment_light.png"> payment.</p>
         <p><img class="icon" src="../shared_images/question_answer_light.png"> question_answer.</p>
         <p><img class="icon" src="../shared_images/refresh_light.png"> refresh.</p>
         <p><img class="icon" src="../shared_images/save_light.png"> save.</p>
index f51a5b6392b67343d99ee7d9595adbbf4d89a606..3cef43b9681d0a8b32722060c13d395177b2a306 100644 (file)
@@ -1,7 +1,7 @@
 <!--
   Copyright © 2016-2019 Soren Stoutner <soren@stoutner.com>.
 
-  Translation 2017-2018 Jose A. León.  Copyright assigned to Soren Stoutner <soren@stoutner.com>.
+  Translation 2017-2019 Jose A. León.  Copyright assigned to Soren Stoutner <soren@stoutner.com>.
 
   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
 
@@ -46,9 +46,9 @@
         <p>Más información sobre las listas de bloqueo puede encontrarse en la <a href="https://easylist.to/">página web de EasyList</a>.</p>
 
         <h3>Librerías</h3>
-        <p>Privacy Browser is built with the <a href="https://developer.android.com/jetpack/androidx/">AndroidX Libraries</a>
-            and code from the <a href="https://mvnrepository.com/artifact/com.google.android.material/material">Google Material Maven repository</a>,
-            which are released under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>.</p>
+        <p>Navegador Privado está construido con las <a href="https://developer.android.com/jetpack/androidx/">librerías de AndroidX</a>
+            y código del <a href="https://mvnrepository.com/artifact/com.google.android.material/material">repositorio de Google Material Maven</a>,
+            que se publican bajo la <a href="https://www.apache.org/licenses/LICENSE-2.0">Licencia Apache 2.0</a>.</p>
         <p>El sabor o versión libre de Navegador Privado está construido con <a href="https://mvnrepository.com/artifact/com.google.firebase/firebase-ads">anuncios de Firebase</a>,
             que se libera bajo la <a href="https://developer.android.com/studio/terms">Licencia del Android Software Development Kit</a>.</p>
 
         <p><img class="icon" src="../shared_images/arrow_forward_dark.png"> arrow_forward.</p>
         <p><img class="icon" src="../shared_images/bookmarks_dark.png"> bookmarks.</p>
         <p><img class="icon" src="../shared_images/bug_report_dark.png"> bug_report.</p>
-        <p><img class="icon" src="../shared_images/call_to_action_dark.png"> call_to_action.</p>
         <p><img class="icon" src="../shared_images/camera_enhance_dark.png"> camera_enhance.</p>
         <p><img class="icon" src="../shared_images/chrome_reader_mode_dark.png"> chrome_reader_mode.</p>
         <p><img class="icon" src="../shared_images/close_dark.png"> close.</p>
         <p><img class="icon" src="../shared_images/file_download_dark.png"> file_download.</p>
         <p><img class="icon" src="../shared_images/find_in_page_dark.png"> find_in_page.</p>
         <p><img class="icon" src="../shared_images/folder_dark.png"> folder.</p>
-        <p><img class="icon" src="../shared_images/fullscreen_dark.png"> fullscreen.</p>
         <p><img class="icon" src="../shared_images/home_dark.png"> home.</p>
         <p><img class="icon" src="../shared_images/image_dark.png"> image.</p>
         <p><img class="icon" src="../shared_images/import_contacts_dark.png"> import_contacts.</p>
         <p><img class="icon" src="../shared_images/map_dark.png"> map.</p>
         <p><img class="icon" src="../shared_images/more_dark.png"> more.</p>
         <p><img class="icon" src="../shared_images/new_releases_dark.png"> new releases.</p>
+        <p><img class="icon" src="../shared_images/payment_dark.png"> payment.</p>
         <p><img class="icon" src="../shared_images/question_answer_dark.png"> question_answer.</p>
         <p><img class="icon" src="../shared_images/refresh_dark.png"> refresh.</p>
         <p><img class="icon" src="../shared_images/save_dark.png"> save.</p>
index 65fffafb2abc682e209bee9b3f35b2d20e6c2ce0..8f2770a2fec0c3616750f5a43ff655986617f137 100644 (file)
@@ -1,7 +1,7 @@
 <!--
   Copyright © 2016-2019 Soren Stoutner <soren@stoutner.com>.
 
-  Translation 2017-2018 Jose A. León.  Copyright assigned to Soren Stoutner <soren@stoutner.com>.
+  Translation 2017-2019 Jose A. León.  Copyright assigned to Soren Stoutner <soren@stoutner.com>.
 
   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
 
@@ -46,9 +46,9 @@
         <p>Más información sobre las listas de bloqueo puede encontrarse en la <a href="https://easylist.to/">página web de EasyList</a>.</p>
 
         <h3>Librerías</h3>
-        <p>Privacy Browser is built with the <a href="https://developer.android.com/jetpack/androidx/">AndroidX Libraries</a>
-            and code from the <a href="https://mvnrepository.com/artifact/com.google.android.material/material">Google Material Maven repository</a>,
-            which are released under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>.</p>
+        <p>Navegador Privado está construido con las <a href="https://developer.android.com/jetpack/androidx/">librerías de AndroidX</a>
+            y código del <a href="https://mvnrepository.com/artifact/com.google.android.material/material">repositorio de Google Material Maven</a>,
+            que se publican bajo la <a href="https://www.apache.org/licenses/LICENSE-2.0">Licencia Apache 2.0</a>.</p>
         <p>El sabor o versión libre de Navegador Privado está construido con <a href="https://mvnrepository.com/artifact/com.google.firebase/firebase-ads">anuncios de Firebase</a>,
             que se libera bajo la <a href="https://developer.android.com/studio/terms">Licencia del Android Software Development Kit</a>.</p>
 
         <p><img class="icon" src="../shared_images/arrow_forward_light.png"> arrow_forward.</p>
         <p><img class="icon" src="../shared_images/bookmarks_light.png"> bookmarks.</p>
         <p><img class="icon" src="../shared_images/bug_report_light.png"> bug_report.</p>
-        <p><img class="icon" src="../shared_images/call_to_action_light.png"> call_to_action.</p>
         <p><img class="icon" src="../shared_images/camera_enhance_light.png"> camera_enhance.</p>
         <p><img class="icon" src="../shared_images/chrome_reader_mode_light.png"> chrome_reader_mode.</p>
         <p><img class="icon" src="../shared_images/close_light.png"> close.</p>
         <p><img class="icon" src="../shared_images/file_download_light.png"> file_download.</p>
         <p><img class="icon" src="../shared_images/find_in_page_light.png"> find_in_page.</p>
         <p><img class="icon" src="../shared_images/folder_light.png"> folder.</p>
-        <p><img class="icon" src="../shared_images/fullscreen_light.png"> fullscreen.</p>
         <p><img class="icon" src="../shared_images/home_light.png"> home.</p>
         <p><img class="icon" src="../shared_images/image_light.png"> image.</p>
         <p><img class="icon" src="../shared_images/import_contacts_light.png"> import_contacts.</p>
         <p><img class="icon" src="../shared_images/map_light.png"> map.</p>
         <p><img class="icon" src="../shared_images/more_light.png"> more.</p>
         <p><img class="icon" src="../shared_images/new_releases_light.png"> new releases.</p>
+        <p><img class="icon" src="../shared_images/payment_light.png"> payment.</p>
         <p><img class="icon" src="../shared_images/question_answer_light.png"> question_answer.</p>
         <p><img class="icon" src="../shared_images/refresh_light.png"> refresh.</p>
         <p><img class="icon" src="../shared_images/save_light.png"> save.</p>
index 92643e3b03843fb76f9e731759dad5f54788b52d..ef967d1d59138ecc150de09009eeb4119df8cc42 100644 (file)
@@ -1,7 +1,7 @@
 <!--
   Copyright © 2017-2019 Soren Stoutner <soren@stoutner.com>.
 
-  Translation 2017-2018 Francesco Buratti.  Copyright assigned to Soren Stoutner <soren@stoutner.com>.
+  Translation 2017-2019 Francesco Buratti.  Copyright assigned to Soren Stoutner <soren@stoutner.com>.
 
   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
@@ -49,9 +49,9 @@
         <p>E' possibile reperire maggiori informazioni sulle block list sul <a href="https://easylist.to/">sito web EasyList</a>.</p>
 
         <h3>Librerie</h3>
-        <p>Privacy Browser is built with the <a href="https://developer.android.com/jetpack/androidx/">AndroidX Libraries</a>
-            and code from the <a href="https://mvnrepository.com/artifact/com.google.android.material/material">Google Material Maven repository</a>,
-            which are released under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>.</p>
+        <p>Privacy Browser è compilato utilizzando le <a href="https://developer.android.com/jetpack/androidx/">Librerie AndroidX</a>
+            e il codice disponibile nella <a href="https://mvnrepository.com/artifact/com.google.android.material/material">Google Material Maven repository</a>,
+            entrambi rilasciati con <a href="https://www.apache.org/licenses/LICENSE-2.0">Licenza Apache 2.0</a>.</p>
         <p>La versione gratuita di Privacy Browser è compilata con <a href="https://mvnrepository.com/artifact/com.google.firebase/firebase-ads">Firebase Ads</a>,
             che è rilasciato sotto la <a href="https://developer.android.com/studio/terms">Licenza Android Software Development Kit</a>.</p>
 
         <p><img class="icon" src="../shared_images/arrow_forward_dark.png"> arrow_forward.</p>
         <p><img class="icon" src="../shared_images/bookmarks_dark.png"> bookmarks.</p>
         <p><img class="icon" src="../shared_images/bug_report_dark.png"> bug_report.</p>
-        <p><img class="icon" src="../shared_images/call_to_action_dark.png"> call_to_action.</p>
         <p><img class="icon" src="../shared_images/camera_enhance_dark.png"> camera_enhance.</p>
         <p><img class="icon" src="../shared_images/chrome_reader_mode_dark.png"> chrome_reader_mode.</p>
         <p><img class="icon" src="../shared_images/close_dark.png"> close.</p>
         <p><img class="icon" src="../shared_images/file_download_dark.png"> file_download.</p>
         <p><img class="icon" src="../shared_images/find_in_page_dark.png"> find_in_page.</p>
         <p><img class="icon" src="../shared_images/folder_dark.png"> folder.</p>
-        <p><img class="icon" src="../shared_images/fullscreen_dark.png"> fullscreen.</p>
         <p><img class="icon" src="../shared_images/home_dark.png"> home.</p>
         <p><img class="icon" src="../shared_images/image_dark.png"> image.</p>
         <p><img class="icon" src="../shared_images/import_contacts_dark.png"> import_contacts.</p>
         <p><img class="icon" src="../shared_images/map_dark.png"> map.</p>
         <p><img class="icon" src="../shared_images/more_dark.png"> more.</p>
         <p><img class="icon" src="../shared_images/new_releases_dark.png"> new releases.</p>
+        <p><img class="icon" src="../shared_images/payment_dark.png"> payment.</p>
         <p><img class="icon" src="../shared_images/question_answer_dark.png"> question_answer.</p>
         <p><img class="icon" src="../shared_images/refresh_dark.png"> refresh.</p>
         <p><img class="icon" src="../shared_images/save_dark.png"> save.</p>
index 23b33f40a04f55cabd2098a0fdffcc7ca742b8b5..361155ad6ae526bc6c662467bb134f7077a51aef 100644 (file)
@@ -1,7 +1,7 @@
 <!--
   Copyright © 2017-2019 Soren Stoutner <soren@stoutner.com>.
 
-  Translation 2017-2018 Francesco Buratti.  Copyright assigned to Soren Stoutner <soren@stoutner.com>.
+  Translation 2017-2019 Francesco Buratti.  Copyright assigned to Soren Stoutner <soren@stoutner.com>.
 
   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
@@ -49,9 +49,9 @@
         <p>E' possibile reperire maggiori informazioni sulle block list sul <a href="https://easylist.to/">sito web EasyList</a>.</p>
 
         <h3>Librerie</h3>
-        <p>Privacy Browser is built with the <a href="https://developer.android.com/jetpack/androidx/">AndroidX Libraries</a>
-            and code from the <a href="https://mvnrepository.com/artifact/com.google.android.material/material">Google Material Maven repository</a>,
-            which are released under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>.</p>
+        <p>Privacy Browser è compilato utilizzando le <a href="https://developer.android.com/jetpack/androidx/">Librerie AndroidX</a>
+            e il codice disponibile nella <a href="https://mvnrepository.com/artifact/com.google.android.material/material">Google Material Maven repository</a>,
+            entrambi rilasciati con <a href="https://www.apache.org/licenses/LICENSE-2.0">Licenza Apache 2.0</a>.</p>
         <p>La versione gratuita di Privacy Browser è compilata con <a href="https://mvnrepository.com/artifact/com.google.firebase/firebase-ads">Firebase Ads</a>,
             che è rilasciato sotto la <a href="https://developer.android.com/studio/terms">Licenza Android Software Development Kit</a>.</p>
 
         <p><img class="icon" src="../shared_images/arrow_forward_light.png"> arrow_forward.</p>
         <p><img class="icon" src="../shared_images/bookmarks_light.png"> bookmarks.</p>
         <p><img class="icon" src="../shared_images/bug_report_light.png"> bug_report.</p>
-        <p><img class="icon" src="../shared_images/call_to_action_light.png"> call_to_action.</p>
         <p><img class="icon" src="../shared_images/camera_enhance_light.png"> camera_enhance.</p>
         <p><img class="icon" src="../shared_images/chrome_reader_mode_light.png"> chrome_reader_mode.</p>
         <p><img class="icon" src="../shared_images/close_light.png"> close.</p>
         <p><img class="icon" src="../shared_images/file_download_light.png"> file_download.</p>
         <p><img class="icon" src="../shared_images/find_in_page_light.png"> find_in_page.</p>
         <p><img class="icon" src="../shared_images/folder_light.png"> folder.</p>
-        <p><img class="icon" src="../shared_images/fullscreen_light.png"> fullscreen.</p>
         <p><img class="icon" src="../shared_images/home_light.png"> home.</p>
         <p><img class="icon" src="../shared_images/image_light.png"> image.</p>
         <p><img class="icon" src="../shared_images/import_contacts_light.png"> import_contacts.</p>
         <p><img class="icon" src="../shared_images/map_light.png"> map.</p>
         <p><img class="icon" src="../shared_images/more_light.png"> more.</p>
         <p><img class="icon" src="../shared_images/new_releases_light.png"> new releases.</p>
+        <p><img class="icon" src="../shared_images/payment_light.png"> payment.</p>
         <p><img class="icon" src="../shared_images/question_answer_light.png"> question_answer.</p>
         <p><img class="icon" src="../shared_images/refresh_light.png"> refresh.</p>
         <p><img class="icon" src="../shared_images/save_light.png"> save.</p>
index 4ff48e6bc701c30266f3ab71b7c41dc9b47f6a34..9b60e92c0fe942f06b99fe8b133814eefb812db2 100644 (file)
@@ -44,9 +44,9 @@
         <p>Более подробную информацию о списках блокировки можно найти на <a href="https://easylist.to/">веб-сайте EasyList</a>.</p>
 
         <h3>Библиотеки</h3>
-        <p>Privacy Browser is built with the <a href="https://developer.android.com/jetpack/androidx/">AndroidX Libraries</a>
-            and code from the <a href="https://mvnrepository.com/artifact/com.google.android.material/material">Google Material Maven repository</a>,
-            which are released under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>.</p>
+        <p>Privacy Browser создан на базе библиотек <a href="https://developer.android.com/jetpack/androidx/">AndroidX</a>
+            и кодовой базы из репозитория <a href="https://mvnrepository.com/artifact/com.google.android.material/material">Google Material Maven</a>,
+            которые выпущены под лицензией <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.</p>
         <p>Бесплатный вариант Privacy Browser создан с помощью <a href="https://mvnrepository.com/artifact/com.google.firebase/firebase-ads">Firebase Ads</a>,
             выпущенной по лицензии <a href="https://developer.android.com/studio/terms">Android Software Development Kit License</a>.</p>
 
         <p><img class="icon" src="../shared_images/arrow_forward_dark.png"> arrow_forward.</p>
         <p><img class="icon" src="../shared_images/bookmarks_dark.png"> bookmarks.</p>
         <p><img class="icon" src="../shared_images/bug_report_dark.png"> bug_report.</p>
-        <p><img class="icon" src="../shared_images/call_to_action_dark.png"> call_to_action.</p>
         <p><img class="icon" src="../shared_images/camera_enhance_dark.png"> camera_enhance.</p>
         <p><img class="icon" src="../shared_images/chrome_reader_mode_dark.png"> chrome_reader_mode.</p>
         <p><img class="icon" src="../shared_images/close_dark.png"> close.</p>
         <p><img class="icon" src="../shared_images/file_download_dark.png"> file_download.</p>
         <p><img class="icon" src="../shared_images/find_in_page_dark.png"> find_in_page.</p>
         <p><img class="icon" src="../shared_images/folder_dark.png"> folder.</p>
-        <p><img class="icon" src="../shared_images/fullscreen_dark.png"> fullscreen.</p>
         <p><img class="icon" src="../shared_images/home_dark.png"> home.</p>
         <p><img class="icon" src="../shared_images/image_dark.png"> image.</p>
         <p><img class="icon" src="../shared_images/import_contacts_dark.png"> import_contacts.</p>
         <p><img class="icon" src="../shared_images/map_dark.png"> map.</p>
         <p><img class="icon" src="../shared_images/more_dark.png"> more.</p>
         <p><img class="icon" src="../shared_images/new_releases_dark.png"> new releases.</p>
+        <p><img class="icon" src="../shared_images/payment_dark.png"> payment.</p>
         <p><img class="icon" src="../shared_images/question_answer_dark.png"> question_answer.</p>
         <p><img class="icon" src="../shared_images/refresh_dark.png"> refresh.</p>
         <p><img class="icon" src="../shared_images/save_dark.png"> save.</p>
index eb8a9c0a1407f893617c5fa3649ff30ecdeb3656..373b61f2ea3834642c990b73482c5cf7b72d5976 100644 (file)
@@ -44,9 +44,9 @@
         <p>Более подробную информацию о списках блокировки можно найти на <a href="https://easylist.to/">веб-сайте EasyList</a>.</p>
 
         <h3>Библиотеки</h3>
-        <p>Privacy Browser is built with the <a href="https://developer.android.com/jetpack/androidx/">AndroidX Libraries</a>
-            and code from the <a href="https://mvnrepository.com/artifact/com.google.android.material/material">Google Material Maven repository</a>,
-            which are released under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>.</p>
+        <p>Privacy Browser создан на базе библиотек <a href="https://developer.android.com/jetpack/androidx/">AndroidX</a>
+            и кодовой базы из репозитория <a href="https://mvnrepository.com/artifact/com.google.android.material/material">Google Material Maven</a>,
+            которые выпущены под лицензией <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.</p>
         <p>Бесплатный вариант Privacy Browser создан с помощью <a href="https://mvnrepository.com/artifact/com.google.firebase/firebase-ads">Firebase Ads</a>,
             выпущенной по лицензии <a href="https://developer.android.com/studio/terms">Android Software Development Kit License</a>.</p>
 
         <p><img class="icon" src="../shared_images/arrow_forward_light.png"> arrow_forward.</p>
         <p><img class="icon" src="../shared_images/bookmarks_light.png"> bookmarks.</p>
         <p><img class="icon" src="../shared_images/bug_report_light.png"> bug_report.</p>
-        <p><img class="icon" src="../shared_images/call_to_action_light.png"> call_to_action.</p>
         <p><img class="icon" src="../shared_images/camera_enhance_light.png"> camera_enhance.</p>
         <p><img class="icon" src="../shared_images/chrome_reader_mode_light.png"> chrome_reader_mode.</p>
         <p><img class="icon" src="../shared_images/close_light.png"> close.</p>
         <p><img class="icon" src="../shared_images/file_download_light.png"> file_download.</p>
         <p><img class="icon" src="../shared_images/find_in_page_light.png"> find_in_page.</p>
         <p><img class="icon" src="../shared_images/folder_light.png"> folder.</p>
-        <p><img class="icon" src="../shared_images/fullscreen_light.png"> fullscreen.</p>
         <p><img class="icon" src="../shared_images/home_light.png"> home.</p>
         <p><img class="icon" src="../shared_images/image_light.png"> image.</p>
         <p><img class="icon" src="../shared_images/import_contacts_light.png"> import_contacts.</p>
         <p><img class="icon" src="../shared_images/map_light.png"> map.</p>
         <p><img class="icon" src="../shared_images/more_light.png"> more.</p>
         <p><img class="icon" src="../shared_images/new_releases_light.png"> new releases.</p>
+        <p><img class="icon" src="../shared_images/payment_light.png"> payment.</p>
         <p><img class="icon" src="../shared_images/question_answer_light.png"> question_answer.</p>
         <p><img class="icon" src="../shared_images/refresh_light.png"> refresh.</p>
         <p><img class="icon" src="../shared_images/save_light.png"> save.</p>
diff --git a/app/src/main/assets/shared_images/call_to_action_dark.png b/app/src/main/assets/shared_images/call_to_action_dark.png
deleted file mode 100644 (file)
index 872e14e..0000000
Binary files a/app/src/main/assets/shared_images/call_to_action_dark.png and /dev/null differ
diff --git a/app/src/main/assets/shared_images/call_to_action_light.png b/app/src/main/assets/shared_images/call_to_action_light.png
deleted file mode 100644 (file)
index 84c2e37..0000000
Binary files a/app/src/main/assets/shared_images/call_to_action_light.png and /dev/null differ
diff --git a/app/src/main/assets/shared_images/fullscreen_dark.png b/app/src/main/assets/shared_images/fullscreen_dark.png
deleted file mode 100644 (file)
index 78ab2ba..0000000
Binary files a/app/src/main/assets/shared_images/fullscreen_dark.png and /dev/null differ
diff --git a/app/src/main/assets/shared_images/fullscreen_light.png b/app/src/main/assets/shared_images/fullscreen_light.png
deleted file mode 100644 (file)
index ae9d4c3..0000000
Binary files a/app/src/main/assets/shared_images/fullscreen_light.png and /dev/null differ
diff --git a/app/src/main/assets/shared_images/payment_dark.png b/app/src/main/assets/shared_images/payment_dark.png
new file mode 100644 (file)
index 0000000..65944b3
Binary files /dev/null and b/app/src/main/assets/shared_images/payment_dark.png differ
diff --git a/app/src/main/assets/shared_images/payment_light.png b/app/src/main/assets/shared_images/payment_light.png
new file mode 100644 (file)
index 0000000..1635483
Binary files /dev/null and b/app/src/main/assets/shared_images/payment_light.png differ
index 98308dd4c1769e8acf02193d64bdc6ff4628c967..c852efefbca7e711c2477aea197fbc68fc54842e 100644 (file)
@@ -99,7 +99,6 @@
         <p><img class="icon" src="../shared_images/arrow_forward_dark.png"> arrow_forward.</p>
         <p><img class="icon" src="../shared_images/bookmarks_dark.png"> bookmarks.</p>
         <p><img class="icon" src="../shared_images/bug_report_dark.png"> bug_report.</p>
-        <p><img class="icon" src="../shared_images/call_to_action_dark.png"> call_to_action.</p>
         <p><img class="icon" src="../shared_images/camera_enhance_dark.png"> camera_enhance.</p>
         <p><img class="icon" src="../shared_images/chrome_reader_mode_dark.png"> chrome_reader_mode.</p>
         <p><img class="icon" src="../shared_images/close_dark.png"> close.</p>
         <p><img class="icon" src="../shared_images/file_download_dark.png"> file_download.</p>
         <p><img class="icon" src="../shared_images/find_in_page_dark.png"> find_in_page.</p>
         <p><img class="icon" src="../shared_images/folder_dark.png"> folder.</p>
-        <p><img class="icon" src="../shared_images/fullscreen_dark.png"> fullscreen.</p>
         <p><img class="icon" src="../shared_images/home_dark.png"> home.</p>
         <p><img class="icon" src="../shared_images/image_dark.png"> image.</p>
         <p><img class="icon" src="../shared_images/import_contacts_dark.png"> import_contacts.</p>
         <p><img class="icon" src="../shared_images/map_dark.png"> map.</p>
         <p><img class="icon" src="../shared_images/more_dark.png"> more.</p>
         <p><img class="icon" src="../shared_images/new_releases_dark.png"> new releases.</p>
+        <p><img class="icon" src="../shared_images/payment_dark.png"> payment.</p>
         <p><img class="icon" src="../shared_images/question_answer_dark.png"> question_answer.</p>
         <p><img class="icon" src="../shared_images/refresh_dark.png"> refresh.</p>
         <p><img class="icon" src="../shared_images/save_dark.png"> save.</p>
index 7aa77d4b79b51968c5e8b9a42415a3c5c31e359f..6bc97ec97afff386150e216ce4415ea65bc8a2d6 100644 (file)
         <p><img class="icon" src="../shared_images/arrow_forward_light.png"> arrow_forward.</p>
         <p><img class="icon" src="../shared_images/bookmarks_light.png"> bookmarks.</p>
         <p><img class="icon" src="../shared_images/bug_report_light.png"> bug_report.</p>
-        <p><img class="icon" src="../shared_images/call_to_action_light.png"> call_to_action.</p>
         <p><img class="icon" src="../shared_images/camera_enhance_light.png"> camera_enhance.</p>
         <p><img class="icon" src="../shared_images/chrome_reader_mode_light.png"> chrome_reader_mode.</p>
         <p><img class="icon" src="../shared_images/close_light.png"> close.</p>
         <p><img class="icon" src="../shared_images/file_download_light.png"> file_download.</p>
         <p><img class="icon" src="../shared_images/find_in_page_light.png"> find_in_page.</p>
         <p><img class="icon" src="../shared_images/folder_light.png"> folder.</p>
-        <p><img class="icon" src="../shared_images/fullscreen_light.png"> fullscreen.</p>
         <p><img class="icon" src="../shared_images/home_light.png"> home.</p>
         <p><img class="icon" src="../shared_images/image_light.png"> image.</p>
         <p><img class="icon" src="../shared_images/import_contacts_light.png"> import_contacts.</p>
         <p><img class="icon" src="../shared_images/map_light.png"> map.</p>
         <p><img class="icon" src="../shared_images/more_light.png"> more.</p>
         <p><img class="icon" src="../shared_images/new_releases_light.png"> new releases.</p>
+        <p><img class="icon" src="../shared_images/payment_light.png"> payment.</p>
         <p><img class="icon" src="../shared_images/question_answer_light.png"> question_answer.</p>
         <p><img class="icon" src="../shared_images/refresh_light.png"> refresh.</p>
         <p><img class="icon" src="../shared_images/save_light.png"> save.</p>
index bbdf85308e4233836b2347e52608dace7a0d2c92..c67d151c7756e2551a4e20a1a093448d120d5966 100644 (file)
@@ -98,7 +98,6 @@ import androidx.appcompat.app.ActionBar;
 import androidx.appcompat.app.ActionBarDrawerToggle;
 import androidx.appcompat.app.AppCompatActivity;
 import androidx.appcompat.widget.Toolbar;
-import androidx.coordinatorlayout.widget.CoordinatorLayout;
 import androidx.core.app.ActivityCompat;
 import androidx.core.content.ContextCompat;
 // `ShortcutInfoCompat`, `ShortcutManagerCompat`, and `IconCompat` can be switched to the non-compat versions once API >= 26.
@@ -136,6 +135,7 @@ import com.stoutner.privacybrowser.helpers.DomainsDatabaseHelper;
 import com.stoutner.privacybrowser.helpers.OrbotProxyHelper;
 import com.stoutner.privacybrowser.dialogs.DownloadFileDialog;
 import com.stoutner.privacybrowser.dialogs.SslCertificateErrorDialog;
+import com.stoutner.privacybrowser.views.NestedScrollWebView;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
@@ -318,7 +318,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
 
     // `mainWebView` is used in `onCreate()`, `onPrepareOptionsMenu()`, `onOptionsItemSelected()`, `onNavigationItemSelected()`, `onRestart()`, `onCreateContextMenu()`, `findPreviousOnPage()`,
     // `findNextOnPage()`, `closeFindOnPage()`, `loadUrlFromTextBox()`, `onSslMismatchBack()`, and `applyProxyThroughOrbot()`.
-    private WebView mainWebView;
+    private NestedScrollWebView mainWebView;
 
     // `fullScreenVideoFrameLayout` is used in `onCreate()` and `onConfigurationChanged()`.
     private FrameLayout fullScreenVideoFrameLayout;
@@ -402,11 +402,8 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
     // `inFullScreenBrowsingMode` is used in `onCreate()`, `onConfigurationChanged()`, and `applyAppSettings()`.
     private boolean inFullScreenBrowsingMode;
 
-    // `hideSystemBarsOnFullscreen` is used in `onCreate()` and `applyAppSettings()`.
-    private boolean hideSystemBarsOnFullscreen;
-
-    // `translucentNavigationBarOnFullscreen` is used in `onCreate()` and `applyAppSettings()`.
-    private boolean translucentNavigationBarOnFullscreen;
+    // Hide app bar is used in `onCreate()` and `applyAppSettings()`.
+    private boolean hideAppBar;
 
     // `reapplyDomainSettingsOnRestart` is used in `onCreate()`, `onOptionsItemSelected()`, `onNavigationItemSelected()`, `onRestart()`, and `onAddDomain()`, .
     private boolean reapplyDomainSettingsOnRestart;
@@ -441,16 +438,13 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
     // `privateDataDirectoryString` is used in `onCreate()`, `onOptionsItemSelected()`, and `onNavigationItemSelected()`.
     private String privateDataDirectoryString;
 
-    // `findOnPageLinearLayout` is used in `onCreate()`, `onOptionsItemSelected()`, and `closeFindOnPage()`.
-    private LinearLayout findOnPageLinearLayout;
-
     // `findOnPageEditText` is used in `onCreate()`, `onOptionsItemSelected()`, and `closeFindOnPage()`.
     private EditText findOnPageEditText;
 
     // `displayAdditionalAppBarIcons` is used in `onCreate()` and `onCreateOptionsMenu()`.
     private boolean displayAdditionalAppBarIcons;
 
-    // The action bar drawer toggle is initialized in `onCreate()` and used in `onPostCreate()`.
+    // The action bar drawer toggle is initialized in `onCreate()` and used in `onResume()`.
     private ActionBarDrawerToggle actionBarDrawerToggle;
 
     // `urlTextBox` is used in `onCreate()`, `onOptionsItemSelected()`, `loadUrlFromTextBox()`, `loadUrl()`, and `highlightUrlText()`.
@@ -543,7 +537,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
         super.onCreate(savedInstanceState);
 
         // Set the content view.
-        setContentView(R.layout.main_drawerlayout);
+        setContentView(R.layout.main_framelayout);
 
         // Get handles for views, resources, and managers.
         Resources resources = getResources();
@@ -631,16 +625,16 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
         this.registerReceiver(orbotStatusBroadcastReceiver, new IntentFilter("org.torproject.android.intent.action.STATUS"));
 
         // Get handles for views that need to be modified.
+        FrameLayout rootFrameLayout = findViewById(R.id.root_framelayout);
         DrawerLayout drawerLayout = findViewById(R.id.drawerlayout);
-        CoordinatorLayout coordinatorLayout = findViewById(R.id.coordinatorlayout);
+        RelativeLayout mainContentRelativeLayout = findViewById(R.id.main_content_relativelayout);
+        SwipeRefreshLayout swipeRefreshLayout = findViewById(R.id.swiperefreshlayout);
+        mainWebView = findViewById(R.id.main_webview);
         bookmarksListView = findViewById(R.id.bookmarks_drawer_listview);
         bookmarksTitleTextView = findViewById(R.id.bookmarks_title_textview);
         FloatingActionButton launchBookmarksActivityFab = findViewById(R.id.launch_bookmarks_activity_fab);
         FloatingActionButton createBookmarkFolderFab = findViewById(R.id.create_bookmark_folder_fab);
         FloatingActionButton createBookmarkFab = findViewById(R.id.create_bookmark_fab);
-        SwipeRefreshLayout swipeRefreshLayout = findViewById(R.id.swiperefreshlayout);
-        mainWebView = findViewById(R.id.main_webview);
-        findOnPageLinearLayout = findViewById(R.id.find_on_page_linearlayout);
         findOnPageEditText = findViewById(R.id.find_on_page_edittext);
         fullScreenVideoFrameLayout = findViewById(R.id.full_screen_video_framelayout);
         urlAppBarRelativeLayout = findViewById(R.id.url_app_bar_relativelayout);
@@ -691,66 +685,47 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
             @Override
             public boolean onDoubleTap(MotionEvent event) {
                 if (fullScreenBrowsingModeEnabled) {  // Only process the double-tap if full screen browsing mode is enabled.
-                    // Toggle `inFullScreenBrowsingMode`.
+                    // Toggle the full screen browsing mode tracker.
                     inFullScreenBrowsingMode = !inFullScreenBrowsingMode;
 
+                    // Toggle the full screen browsing mode.
                     if (inFullScreenBrowsingMode) {  // Switch to full screen mode.
-                        // Hide the action bar.
-                        actionBar.hide();
+                        // Hide the app bar if specified.
+                        if (hideAppBar) {
+                            actionBar.hide();
+                        }
 
                         // Hide the banner ad in the free flavor.
                         if (BuildConfig.FLAVOR.contentEquals("free")) {
-                            // The AdView is destroyed and recreated, which changes the ID, every time it is reloaded to handle possible rotations.
                             AdHelper.hideAd(findViewById(R.id.adview));
                         }
 
-                        // Modify the system bars.
-                        if (hideSystemBarsOnFullscreen) {  // Hide everything.
-                            // Remove the translucent overlays.
-                            getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
-
-                            // Remove the translucent status bar overlay on the `Drawer Layout`, which is special and needs its own command.
-                            drawerLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
-
-                            /* SYSTEM_UI_FLAG_FULLSCREEN hides the status bar at the top of the screen.
-                             * SYSTEM_UI_FLAG_HIDE_NAVIGATION hides the navigation bar on the bottom or right of the screen.
-                             * SYSTEM_UI_FLAG_IMMERSIVE_STICKY makes the status and navigation bars translucent and automatically re-hides them after they are shown.
-                             */
-                            coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
-
-                            // Set the coordinator layout to fill the entire screen.
-                            coordinatorLayout.setFitsSystemWindows(false);
-                        } else {  // Hide everything except the status and navigation bars.
-                            // Set the coordinator layout to fill the entire screen.
-                            coordinatorLayout.setFitsSystemWindows(false);
-
-                            // There is an Android Support Library bug that causes a scrim to print on the right side of the `Drawer Layout` when the navigation bar is displayed on the right of the screen.
-                            if (translucentNavigationBarOnFullscreen) {
-                                // Set the navigation bar to be translucent.
-                                getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
-                            }
-                        }
+                        // Remove the translucent status flag.  This is necessary so the root frame layout can fill the entire screen.
+                        getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+
+                        /* Hide the system bars.
+                         * SYSTEM_UI_FLAG_FULLSCREEN hides the status bar at the top of the screen.
+                         * SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN makes the root frame layout fill the area that is normally reserved for the status bar.
+                         * SYSTEM_UI_FLAG_HIDE_NAVIGATION hides the navigation bar on the bottom or right of the screen.
+                         * SYSTEM_UI_FLAG_IMMERSIVE_STICKY makes the status and navigation bars translucent and automatically re-hides them after they are shown.
+                         */
+                        rootFrameLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
+                                View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
                     } else {  // Switch to normal viewing mode.
-                        // Show the action bar.
+                        // Show the app bar.
                         actionBar.show();
 
-                        // Show the `BannerAd` in the free flavor.
+                        // Show the banner ad in the free flavor.
                         if (BuildConfig.FLAVOR.contentEquals("free")) {
-                            // Reload the ad.  The AdView is destroyed and recreated, which changes the ID, every time it is reloaded to handle possible rotations.
+                            // Reload the ad.
                             AdHelper.loadAd(findViewById(R.id.adview), getApplicationContext(), getString(R.string.ad_unit_id));
                         }
 
-                        // Remove the translucent navigation bar flag if it is set.
-                        getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
+                        // Remove the `SYSTEM_UI` flags from the root frame layout.
+                        rootFrameLayout.setSystemUiVisibility(0);
 
-                        // Add the translucent status flag if it is unset.  This also resets `drawerLayout's` `View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN`.
+                        // Add the translucent status flag.
                         getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
-
-                        // Remove any `SYSTEM_UI` flags from the coordinator layout.
-                        coordinatorLayout.setSystemUiVisibility(0);
-
-                        // Constrain the coordinator layout inside the status and navigation bars.
-                        coordinatorLayout.setFitsSystemWindows(true);
                     }
 
                     // Consume the double-tap.
@@ -829,6 +804,9 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
         // Implement swipe to refresh.
         swipeRefreshLayout.setOnRefreshListener(() -> mainWebView.reload());
 
+        // The swipe to refresh circle doesn't always hide itself completely unless it is moved up 10 pixels.
+        swipeRefreshLayout.setProgressViewOffset(false, swipeRefreshLayout.getProgressViewStartOffset() - 10, swipeRefreshLayout.getProgressViewEndOffset());
+
         // Set the swipe to refresh color according to the theme.
         if (darkTheme) {
             swipeRefreshLayout.setColorSchemeResources(R.color.blue_600);
@@ -1051,7 +1029,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
 
             // Enter full screen video.
             @Override
-            public void onShowCustomView(View view, CustomViewCallback callback) {
+            public void onShowCustomView(View video, CustomViewCallback callback) {
                 // Set the full screen video flag.
                 displayingFullScreenVideo = true;
 
@@ -1061,29 +1039,34 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                     AdHelper.pauseAd(findViewById(R.id.adview));
                 }
 
-                // Remove the translucent overlays.
-                getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+                // Hide the keyboard.
+                inputMethodManager.hideSoftInputFromWindow(mainWebView.getWindowToken(), 0);
+
+                // Hide the main content relative layout.
+                mainContentRelativeLayout.setVisibility(View.GONE);
 
                 // Remove the translucent status bar overlay on the `Drawer Layout`, which is special and needs its own command.
                 drawerLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
 
-                /* SYSTEM_UI_FLAG_FULLSCREEN hides the status bar at the top of the screen.
+                // Remove the translucent status flag.  This is necessary so the root frame layout can fill the entire screen.
+                getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+
+                /* Hide the system bars.
+                 * SYSTEM_UI_FLAG_FULLSCREEN hides the status bar at the top of the screen.
+                 * SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN makes the root frame layout fill the area that is normally reserved for the status bar.
                  * SYSTEM_UI_FLAG_HIDE_NAVIGATION hides the navigation bar on the bottom or right of the screen.
                  * SYSTEM_UI_FLAG_IMMERSIVE_STICKY makes the status and navigation bars translucent and automatically re-hides them after they are shown.
                  */
-                coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
-
-                // Set the coordinator layout to fill the entire screen.
-                coordinatorLayout.setFitsSystemWindows(false);
-
-                // Hide the action bar.
-                actionBar.hide();
+                rootFrameLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
+                        View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
 
                 // Disable the sliding drawers.
                 drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
 
-                // Add `view` to `fullScreenVideoFrameLayout` and display it on the screen.
-                fullScreenVideoFrameLayout.addView(view);
+                // Add the video view to the full screen video frame layout.
+                fullScreenVideoFrameLayout.addView(video);
+
+                // Show the full screen video frame layout.
                 fullScreenVideoFrameLayout.setVisibility(View.VISIBLE);
             }
 
@@ -1093,76 +1076,52 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                 // Unset the full screen video flag.
                 displayingFullScreenVideo = false;
 
-                // Hide `fullScreenVideoFrameLayout`.
+                // Remove all the views from the full screen video frame layout.
                 fullScreenVideoFrameLayout.removeAllViews();
+
+                // Hide the full screen video frame layout.
                 fullScreenVideoFrameLayout.setVisibility(View.GONE);
 
                 // Enable the sliding drawers.
                 drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);
 
+                // Show the main content relative layout.
+                mainContentRelativeLayout.setVisibility(View.VISIBLE);
+
                 // Apply the appropriate full screen mode the `SYSTEM_UI` flags.
                 if (fullScreenBrowsingModeEnabled && inFullScreenBrowsingMode) {  // Privacy Browser is currently in full screen browsing mode.
-                    if (hideSystemBarsOnFullscreen) {  // Hide everything.
-                        // Remove the translucent navigation setting if it is currently flagged.
-                        getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
-
-                        // Remove the translucent status bar overlay.
-                        getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
-
-                        // Remove the translucent status bar overlay on the `Drawer Layout`, which is special and needs its own command.
-                        drawerLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
-
-                        /* SYSTEM_UI_FLAG_FULLSCREEN hides the status bar at the top of the screen.
-                         * SYSTEM_UI_FLAG_HIDE_NAVIGATION hides the navigation bar on the bottom or right of the screen.
-                         * SYSTEM_UI_FLAG_IMMERSIVE_STICKY makes the status and navigation bars translucent and automatically re-hides them after they are shown.
-                         */
-                        coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
-                    } else {  // Hide everything except the status and navigation bars.
-                        // Remove any `SYSTEM_UI` flags from the coordinator layout.
-                        coordinatorLayout.setSystemUiVisibility(0);
-
-                        // Add the translucent status flag if it is unset.
-                        getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
-
-                        if (translucentNavigationBarOnFullscreen) {
-                            // Set the navigation bar to be translucent.  This also resets `drawerLayout's` `View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN`.
-                            getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
-                        } else {
-                            // Set the navigation bar to be black.
-                            getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
-                        }
-                    }
-                } else {  // Switch to normal viewing mode.
-                    // Show the action bar if the find on page linear layout is not visible.
-                    if (findOnPageLinearLayout.getVisibility() == View.GONE) {
-                        actionBar.show();
+                    // Hide the app bar if specified.
+                    if (hideAppBar) {
+                        actionBar.hide();
                     }
 
-                    // Show the `BannerAd` in the free flavor.
+                    // Hide the banner ad in the free flavor.
                     if (BuildConfig.FLAVOR.contentEquals("free")) {
-                        // Initialize the ad.  The AdView is destroyed and recreated, which changes the ID, every time it is reloaded to handle possible rotations.
-                        AdHelper.initializeAds(findViewById(R.id.adview), getApplicationContext(), fragmentManager, getString(R.string.google_app_id), getString(R.string.ad_unit_id));
+                        AdHelper.hideAd(findViewById(R.id.adview));
                     }
 
-                    // Remove any `SYSTEM_UI` flags from the coordinator layout.
-                    coordinatorLayout.setSystemUiVisibility(0);
-
-                    // Remove the translucent navigation bar flag if it is set.
-                    getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
+                    // Remove the translucent status flag.  This is necessary so the root frame layout can fill the entire screen.
+                    getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+
+                    /* Hide the system bars.
+                     * SYSTEM_UI_FLAG_FULLSCREEN hides the status bar at the top of the screen.
+                     * SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN makes the root frame layout fill the area that is normally reserved for the status bar.
+                     * SYSTEM_UI_FLAG_HIDE_NAVIGATION hides the navigation bar on the bottom or right of the screen.
+                     * SYSTEM_UI_FLAG_IMMERSIVE_STICKY makes the status and navigation bars translucent and automatically re-hides them after they are shown.
+                     */
+                    rootFrameLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
+                            View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
+                } else {  // Switch to normal viewing mode.
+                    // Remove the `SYSTEM_UI` flags from the root frame layout.
+                    rootFrameLayout.setSystemUiVisibility(0);
 
-                    // Add the translucent status flag if it is unset.  This also resets `drawerLayout's` `View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN`.
+                    // Add the translucent status flag.
                     getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
-
-                    // Constrain the coordinator layout inside the status and navigation bars.
-                    coordinatorLayout.setFitsSystemWindows(true);
-
-                    // Show the action bar.
-                    actionBar.show();
                 }
 
-                // Show the ad if this is the free flavor.
-                if (BuildConfig.FLAVOR.contentEquals("free")) {
-                    // Reload the ad.  The AdView is destroyed and recreated, which changes the ID, every time it is reloaded to handle possible rotations.
+                // Reload the ad for the free flavor if not in full screen mode.
+                if (BuildConfig.FLAVOR.contentEquals("free") && !inFullScreenBrowsingMode) {
+                    // Reload the ad.
                     AdHelper.loadAd(findViewById(R.id.adview), getApplicationContext(), getString(R.string.ad_unit_id));
                 }
             }
@@ -1627,7 +1586,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                     mainWebView.setVisibility(View.INVISIBLE);
                 }
 
-                // Hide the keyboard.  `0` indicates no additional flags.
+                // Hide the keyboard.
                 inputMethodManager.hideSoftInputFromWindow(mainWebView.getWindowToken(), 0);
 
                 // Check to see if Privacy Browser is waiting on Orbot.
@@ -1974,12 +1933,6 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
         // Resume `mainWebView`.
         mainWebView.onResume();
 
-        // Resume the adView for the free flavor.
-        if (BuildConfig.FLAVOR.contentEquals("free")) {
-            // Resume the ad.
-            AdHelper.resumeAd(findViewById(R.id.adview));
-        }
-
         // Display a message to the user if waiting for Orbot.
         if (waitingForOrbot && !orbotStatus.equals("ON")) {
             // Disable the wide view port so that the waiting for Orbot text is displayed correctly.
@@ -1989,22 +1942,24 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
             mainWebView.loadData(waitingForOrbotHtmlString, "text/html", null);
         }
 
-        if (displayingFullScreenVideo) {
-            // Get handles for the layouts that need to be modified.
-            DrawerLayout drawerLayout = findViewById(R.id.drawerlayout);
-            CoordinatorLayout coordinatorLayout = findViewById(R.id.coordinatorlayout);
+        if (displayingFullScreenVideo || inFullScreenBrowsingMode) {
+            // Get a handle for the root frame layouts.
+            FrameLayout rootFrameLayout = findViewById(R.id.root_framelayout);
 
-            // Remove the translucent overlays.
+            // Remove the translucent status flag.  This is necessary so the root frame layout can fill the entire screen.
             getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
 
-            // Remove the translucent status bar overlay on the `Drawer Layout`, which is special and needs its own command.
-            drawerLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
-
-            /* SYSTEM_UI_FLAG_FULLSCREEN hides the status bar at the top of the screen.
+            /* Hide the system bars.
+             * SYSTEM_UI_FLAG_FULLSCREEN hides the status bar at the top of the screen.
+             * SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN makes the root frame layout fill the area that is normally reserved for the status bar.
              * SYSTEM_UI_FLAG_HIDE_NAVIGATION hides the navigation bar on the bottom or right of the screen.
              * SYSTEM_UI_FLAG_IMMERSIVE_STICKY makes the status and navigation bars translucent and automatically re-hides them after they are shown.
              */
-            coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
+            rootFrameLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
+                    View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
+        } else if (BuildConfig.FLAVOR.contentEquals("free")) {  // Resume the adView for the free flavor.
+            // Resume the ad.
+            AdHelper.resumeAd(findViewById(R.id.adview));
         }
     }
 
@@ -2307,6 +2262,23 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
     // removeAllCookies is deprecated, but it is required for API < 21.
     @SuppressWarnings("deprecation")
     public boolean onOptionsItemSelected(MenuItem menuItem) {
+        // Reenter full screen browsing mode if it was interrupted by the options menu.  <https://redmine.stoutner.com/issues/389>
+        if (inFullScreenBrowsingMode) {
+            // Remove the translucent status flag.  This is necessary so the root frame layout can fill the entire screen.
+            getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+
+            FrameLayout rootFrameLayout = findViewById(R.id.root_framelayout);
+
+            /* Hide the system bars.
+             * SYSTEM_UI_FLAG_FULLSCREEN hides the status bar at the top of the screen.
+             * SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN makes the root frame layout fill the area that is normally reserved for the status bar.
+             * SYSTEM_UI_FLAG_HIDE_NAVIGATION hides the navigation bar on the bottom or right of the screen.
+             * SYSTEM_UI_FLAG_IMMERSIVE_STICKY makes the status and navigation bars translucent and automatically re-hides them after they are shown.
+             */
+            rootFrameLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
+                    View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
+        }
+
         // Get the selected menu item ID.
         int menuItemId = menuItem.getItemId();
 
@@ -2839,16 +2811,17 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                 return true;
 
             case R.id.find_on_page:
-                // Get a handle for the toolbar.
+                // Get a handle for the views.
                 Toolbar toolbar = findViewById(R.id.toolbar);
+                LinearLayout findOnPageLinearLayout = findViewById(R.id.find_on_page_linearlayout);
 
-                // Hide the URL app bar.
+                // Hide the toolbar.
                 toolbar.setVisibility(View.GONE);
 
-                // Show the Find on Page `RelativeLayout`.
+                // Show the find on page linear layout.
                 findOnPageLinearLayout.setVisibility(View.VISIBLE);
 
-                // Display the keyboard.  We have to wait 200 ms before running the command to work around a bug in Android.
+                // Display the keyboard.  The app must wait 200 ms before running the command to work around a bug in Android.
                 // http://stackoverflow.com/questions/5520085/android-show-softkeyboard-with-showsoftinput-is-not-working
                 findOnPageEditText.postDelayed(() -> {
                     // Set the focus on `findOnPageEditText`.
@@ -3204,12 +3177,13 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
         // Run the default commands.
         super.onPostCreate(savedInstanceState);
 
-        // Sync the state of the DrawerToggle after onRestoreInstanceState has finished.
+        // Sync the state of the DrawerToggle after the default `onRestoreInstanceState()` has finished.  This creates the navigation drawer icon.
         actionBarDrawerToggle.syncState();
     }
 
     @Override
     public void onConfigurationChanged(Configuration newConfig) {
+        // Run the default commands.
         super.onConfigurationChanged(newConfig);
 
         // Get the status bar pixel size.
@@ -4078,22 +4052,23 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
     }
 
     public void closeFindOnPage(View view) {
+        // Get a handle for the views.
+        Toolbar toolbar = findViewById(R.id.toolbar);
+        LinearLayout findOnPageLinearLayout = findViewById(R.id.find_on_page_linearlayout);
+
         // Delete the contents of `find_on_page_edittext`.
         findOnPageEditText.setText(null);
 
         // Clear the highlighted phrases.
         mainWebView.clearMatches();
 
-        // Hide the Find on Page `RelativeLayout`.
+        // Hide the find on page linear layout.
         findOnPageLinearLayout.setVisibility(View.GONE);
 
-        // Get a handle for the toolbar.
-        Toolbar toolbar = findViewById(R.id.toolbar);
-
         // Show the toolbar.
         toolbar.setVisibility(View.VISIBLE);
 
-        // Hide the keyboard so we can see the webpage.  `0` indicates no additional flags.
+        // Hide the keyboard.
         inputMethodManager.hideSoftInputFromWindow(mainWebView.getWindowToken(), 0);
     }
 
@@ -4106,10 +4081,16 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
         boolean doNotTrackEnabled = sharedPreferences.getBoolean("do_not_track", false);
         proxyThroughOrbot = sharedPreferences.getBoolean("proxy_through_orbot", false);
         fullScreenBrowsingModeEnabled = sharedPreferences.getBoolean("full_screen_browsing_mode", false);
-        hideSystemBarsOnFullscreen = sharedPreferences.getBoolean("hide_system_bars", false);
-        translucentNavigationBarOnFullscreen = sharedPreferences.getBoolean("translucent_navigation_bar", true);
+        hideAppBar = sharedPreferences.getBoolean("hide_app_bar", true);
         downloadWithExternalApp = sharedPreferences.getBoolean("download_with_external_app", false);
 
+        // Get handles for the views that need to be modified.  `getSupportActionBar()` must be used until the minimum API >= 21.
+        FrameLayout rootFrameLayout = findViewById(R.id.root_framelayout);
+        ActionBar actionBar = getSupportActionBar();
+
+        // Remove the incorrect lint warnings below that the action bar might be null.
+        assert actionBar != null;
+
         // Apply the proxy through Orbot settings.
         applyProxyThroughOrbot(false);
 
@@ -4120,75 +4101,56 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
             customHeaders.remove("DNT");
         }
 
-        // Get handles for the views that need to be modified.  `getSupportActionBar()` must be used until the minimum API >= 21.
-        DrawerLayout drawerLayout = findViewById(R.id.drawerlayout);
-        CoordinatorLayout coordinatorLayout = findViewById(R.id.coordinatorlayout);
-        ActionBar actionBar = getSupportActionBar();
+        // Set the app bar scrolling.
+        mainWebView.setNestedScrollingEnabled(sharedPreferences.getBoolean("scroll_app_bar", true));
 
-        // Apply the appropriate full screen mode the `SYSTEM_UI` flags.
+        // Update the full screen browsing mode settings.
         if (fullScreenBrowsingModeEnabled && inFullScreenBrowsingMode) {  // Privacy Browser is currently in full screen browsing mode.
-            if (hideSystemBarsOnFullscreen) {  // Hide everything.
-                // Remove the translucent navigation setting if it is currently flagged.
-                getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
-
-                // Remove the translucent status bar overlay.
-                getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
-
-                // Remove the translucent status bar overlay on the `Drawer Layout`, which is special and needs its own command.
-                drawerLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
+            // Update the visibility of the app bar, which might have changed in the settings.
+            if (hideAppBar) {
+                actionBar.hide();
+            } else {
+                actionBar.show();
+            }
 
-                /* SYSTEM_UI_FLAG_FULLSCREEN hides the status bar at the top of the screen.
-                 * SYSTEM_UI_FLAG_HIDE_NAVIGATION hides the navigation bar on the bottom or right of the screen.
-                 * SYSTEM_UI_FLAG_IMMERSIVE_STICKY makes the status and navigation bars translucent and automatically re-hides them after they are shown.
-                 */
-                coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
-            } else {  // Hide everything except the status and navigation bars.
-                // Remove any `SYSTEM_UI` flags from the coordinator layout.
-                coordinatorLayout.setSystemUiVisibility(0);
+            // Hide the banner ad in the free flavor.
+            if (BuildConfig.FLAVOR.contentEquals("free")) {
+                AdHelper.hideAd(findViewById(R.id.adview));
+            }
 
-                // Add the translucent status flag if it is unset.
-                getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+            // Remove the translucent status flag.  This is necessary so the root frame layout can fill the entire screen.
+            getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
 
-                if (translucentNavigationBarOnFullscreen) {
-                    // Set the navigation bar to be translucent.
-                    getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
-                } else {
-                    // Set the navigation bar to be black.
-                    getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
-                }
-            }
+            /* Hide the system bars.
+             * SYSTEM_UI_FLAG_FULLSCREEN hides the status bar at the top of the screen.
+             * SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN makes the root frame layout fill the area that is normally reserved for the status bar.
+             * SYSTEM_UI_FLAG_HIDE_NAVIGATION hides the navigation bar on the bottom or right of the screen.
+             * SYSTEM_UI_FLAG_IMMERSIVE_STICKY makes the status and navigation bars translucent and automatically re-hides them after they are shown.
+             */
+            rootFrameLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
+                    View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
         } else {  // Privacy Browser is not in full screen browsing mode.
             // Reset the full screen tracker, which could be true if Privacy Browser was in full screen mode before entering settings and full screen browsing was disabled.
             inFullScreenBrowsingMode = false;
 
-            // Remove the incorrect lint warning below that the action bar might be null.
-            assert actionBar != null;
+            // Show the app bar.
+            actionBar.show();
 
-            // Show the action bar if the find on page linear layout is not visible.
-            if (findOnPageLinearLayout.getVisibility() == View.GONE) {
-                actionBar.show();
-            }
-
-            // Show the `BannerAd` in the free flavor.
+            // Show the banner ad in the free flavor.
             if (BuildConfig.FLAVOR.contentEquals("free")) {
-                // Initialize the ad.  The AdView is destroyed and recreated, which changes the ID, every time it is reloaded to handle possible rotations.
+                // Initialize the ads.  If this isn't the first run, `loadAd()` will be automatically called instead.
                 AdHelper.initializeAds(findViewById(R.id.adview), getApplicationContext(), fragmentManager, getString(R.string.google_app_id), getString(R.string.ad_unit_id));
             }
 
-            // Remove any `SYSTEM_UI` flags from the coordinator layout.
-            coordinatorLayout.setSystemUiVisibility(0);
-
-            // Remove the translucent navigation bar flag if it is set.
-            getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
+            // Remove the `SYSTEM_UI` flags from the root frame layout.
+            rootFrameLayout.setSystemUiVisibility(0);
 
-            // Add the translucent status flag if it is unset.  This also resets `drawerLayout's` `View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN`.
+            // Add the translucent status flag.
             getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
-
-            // Constrain the coordinator layout inside the status and navigation bars.
-            coordinatorLayout.setFitsSystemWindows(true);
         }
     }
 
+
     // `reloadWebsite` is used if returning from the Domains activity.  Otherwise JavaScript might not function correctly if it is newly enabled.
     // The deprecated `.getDrawable()` must be used until the minimum API >= 21.
     @SuppressWarnings("deprecation")
@@ -4584,9 +4546,6 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
             if (mainMenu != null) {
                 updatePrivacyIcons(true);
             }
-
-            // TODO.
-            swipeRefreshLayout.setEnabled(false);
         }
 
         // Reload the website if returning from the Domains activity.
index af87568b34493537dab5d04d9fe234779f2a8bcf..b9f8e16c7c177fe287ee500a59f1cfd9ed7a4b2d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2016-2018 Soren Stoutner <soren@stoutner.com>.
+ * Copyright © 2016-2019 Soren Stoutner <soren@stoutner.com>.
  *
  * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
  *
@@ -78,8 +78,7 @@ public class SettingsFragment extends PreferenceFragment {
         final Preference searchPreference = findPreference("search");
         final Preference searchCustomURLPreference = findPreference("search_custom_url");
         final Preference fullScreenBrowsingModePreference = findPreference("full_screen_browsing_mode");
-        final Preference hideSystemBarsPreference = findPreference("hide_system_bars");
-        final Preference translucentNavigationBarPreference = findPreference("translucent_navigation_bar");
+        final Preference hideAppBarPreference = findPreference("hide_app_bar");
         final Preference clearEverythingPreference = findPreference("clear_everything");
         final Preference clearCookiesPreference = findPreference("clear_cookies");
         final Preference clearDomStoragePreference = findPreference("clear_dom_storage");
@@ -88,8 +87,9 @@ public class SettingsFragment extends PreferenceFragment {
         final Preference homepagePreference = findPreference("homepage");
         final Preference fontSizePreference = findPreference("font_size");
         final Preference swipeToRefreshPreference = findPreference("swipe_to_refresh");
-        final Preference downloadWithExternalAppPreference = findPreference("download_with_external_app");
+        final Preference scrollAppBarPreference = findPreference("scroll_app_bar");
         final Preference displayAdditionalAppBarIconsPreference = findPreference("display_additional_app_bar_icons");
+        final Preference downloadWithExternalAppPreference = findPreference("download_with_external_app");
         final Preference darkThemePreference = findPreference("dark_theme");
         final Preference nightModePreference = findPreference("night_mode");
         final Preference displayWebpageImagesPreference = findPreference("display_webpage_images");
@@ -97,9 +97,9 @@ public class SettingsFragment extends PreferenceFragment {
         // Set dependencies.
         torHomepagePreference.setDependency("proxy_through_orbot");
         torSearchPreference.setDependency("proxy_through_orbot");
-        hideSystemBarsPreference.setDependency("full_screen_browsing_mode");
+        hideAppBarPreference.setDependency("full_screen_browsing_mode");
 
-        // Get Strings from the preferences.
+        // Get strings from the preferences.
         String torSearchString = savedPreferences.getString("tor_search", getString(R.string.tor_search_default_value));
         String searchString = savedPreferences.getString("search", getString(R.string.search_default_value));
 
@@ -111,7 +111,6 @@ public class SettingsFragment extends PreferenceFragment {
         boolean fanboySocialBlockingEnabled = savedPreferences.getBoolean("fanboys_social_blocking_list", true);
         boolean proxyThroughOrbot = savedPreferences.getBoolean("proxy_through_orbot", false);
         boolean fullScreenBrowsingMode = savedPreferences.getBoolean("full_screen_browsing_mode", false);
-        boolean hideSystemBars = savedPreferences.getBoolean("hide_system_bars", false);
         boolean clearEverything = savedPreferences.getBoolean("clear_everything", true);
         final boolean nightMode = savedPreferences.getBoolean("night_mode", false);
 
@@ -212,11 +211,7 @@ public class SettingsFragment extends PreferenceFragment {
         searchCustomURLPreference.setSummary(savedPreferences.getString("search_custom_url", getString(R.string.search_custom_url_default_value)));
         searchCustomURLPreference.setEnabled(searchString.equals("Custom URL"));
 
-
-        // Enable the translucent navigation bar preference only if full screen browsing mode is enabled and `hide_system_bars` is disabled.
-        translucentNavigationBarPreference.setEnabled(fullScreenBrowsingMode && !hideSystemBars);
-
-        // Set the status of the `Clear and Exit` preferences.
+        // Set the status of the Clear and Exit preferences.
         clearCookiesPreference.setEnabled(!clearEverything);
         clearDomStoragePreference.setEnabled(!clearEverything);
         clearFormDataPreference.setEnabled(!clearEverything);  // The form data line can be removed once the minimum API is >= 26.
@@ -522,49 +517,30 @@ public class SettingsFragment extends PreferenceFragment {
                 fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_enabled_light);
             }
 
-            if (hideSystemBars) {  // `hideSystemBarsBoolean` is `true`.
-                // Set the icons according to the theme.
+            // Set the hide app bar icon.
+            if (savedPreferences.getBoolean("hide_app_bar", true)) {  // Hide app bar is enabled.
+                // Set the icon according to the theme.
                 if (MainWebViewActivity.darkTheme) {
-                    hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_enabled_dark);
-                    translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted_dark);
+                    hideAppBarPreference.setIcon(R.drawable.app_bar_enabled_dark);
                 } else {
-                    hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_enabled_light);
-                    translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted_light);
+                    hideAppBarPreference.setIcon(R.drawable.app_bar_enabled_light);
                 }
-            } else {  // `hideSystemBarsBoolean` is `false`.
-                // Set the `hideSystemBarsPreference` icon according to the theme.
+            } else {  // Hide app bar is disabled.
+                // Set the icon according to the theme.
                 if (MainWebViewActivity.darkTheme) {
-                    // Set the icon for `hideSystemBarsPreference`.
-                    hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_disabled_dark);
-
-                    // Set the icon for `translucentNavigationBarPreference`.
-                    if (savedPreferences.getBoolean("translucent_navigation_bar", true)) {
-                        translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_enabled_dark);
-                    } else {
-                        translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_disabled_dark);
-                    }
+                    hideAppBarPreference.setIcon(R.drawable.app_bar_disabled_dark);
                 } else {
-                    // Set the icon for `hideSystemBarsPreference`.
-                    hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_disabled_light);
-
-                    // Set the icon for `translucentNavigationBarPreference`.
-                    if (savedPreferences.getBoolean("translucent_navigation_bar", true)) {
-                        translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_enabled_light);
-                    } else {
-                        translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_disabled_light);
-                    }
+                    hideAppBarPreference.setIcon(R.drawable.app_bar_disabled_light);
                 }
             }
         } else {  // Full screen browsing mode is disabled.
             // Set the icons according to the theme.
             if (MainWebViewActivity.darkTheme) {
                 fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_disabled_dark);
-                hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_ghosted_dark);
-                translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted_dark);
+                hideAppBarPreference.setIcon(R.drawable.app_bar_ghosted_dark);
             } else {
                 fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_disabled_light);
-                hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_ghosted_light);
-                translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted_light);
+                hideAppBarPreference.setIcon(R.drawable.app_bar_ghosted_light);
             }
         }
 
@@ -640,18 +616,18 @@ public class SettingsFragment extends PreferenceFragment {
             }
         }
 
-        // Set the download with external app preference icon.
-        if (savedPreferences.getBoolean("download_with_external_app", false)) {
+        // Set the scroll app bar preference icon.
+        if (savedPreferences.getBoolean("scroll_app_bar", true)) {
             if (MainWebViewActivity.darkTheme) {
-                downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_enabled_dark);
+                scrollAppBarPreference.setIcon(R.drawable.app_bar_enabled_dark);
             } else {
-                downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_enabled_light);
+                scrollAppBarPreference.setIcon(R.drawable.app_bar_enabled_light);
             }
         } else {
             if (MainWebViewActivity.darkTheme) {
-                downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_disabled_dark);
+                scrollAppBarPreference.setIcon(R.drawable.app_bar_disabled_dark);
             } else {
-                downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_disabled_light);
+                scrollAppBarPreference.setIcon(R.drawable.app_bar_disabled_light);
             }
         }
 
@@ -670,6 +646,21 @@ public class SettingsFragment extends PreferenceFragment {
             }
         }
 
+        // Set the download with external app preference icon.
+        if (savedPreferences.getBoolean("download_with_external_app", false)) {
+            if (MainWebViewActivity.darkTheme) {
+                downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_enabled_dark);
+            } else {
+                downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_enabled_light);
+            }
+        } else {
+            if (MainWebViewActivity.darkTheme) {
+                downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_disabled_dark);
+            } else {
+                downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_disabled_light);
+            }
+        }
+
         // Set the dark theme preference icon.
         if (savedPreferences.getBoolean("dark_theme", false)) {
             darkThemePreference.setIcon(R.drawable.theme_dark);
@@ -1221,125 +1212,57 @@ public class SettingsFragment extends PreferenceFragment {
                     break;
 
                 case "full_screen_browsing_mode":
-                    if (sharedPreferences.getBoolean("full_screen_browsing_mode", false)) {
-                        // Set the `fullScreenBrowsingModePreference` icon according to the theme.
+                    if (sharedPreferences.getBoolean("full_screen_browsing_mode", false)) {  // Full screen browsing is enabled.
+                        // Set the full screen browsing mode preference icon according to the theme.
                         if (MainWebViewActivity.darkTheme) {
                             fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_enabled_dark);
                         } else {
                             fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_enabled_light);
                         }
 
-                        if (sharedPreferences.getBoolean("hide_system_bars", false)) {  // `hide_system_bars` is `true`.
-                            // Disable `translucentNavigationBarPreference`.
-                            translucentNavigationBarPreference.setEnabled(false);
-
-                            // Set the icons according to the theme.
+                        // Set the hide app bar preference icon.
+                        if (sharedPreferences.getBoolean("hide_app_bar", true)) {  //  Hide app bar is enabled.
+                            // Set the icon according to the theme.
                             if (MainWebViewActivity.darkTheme) {
-                                hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_enabled_dark);
-                                translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted_dark);
+                                hideAppBarPreference.setIcon(R.drawable.app_bar_enabled_dark);
                             } else {
-                                hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_enabled_light);
-                                translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted_light);
+                                hideAppBarPreference.setIcon(R.drawable.app_bar_enabled_light);
                             }
-                        } else {  // `hide_system_bars` is `false`.
-                            // Enable `translucentNavigationBarPreference`.
-                            translucentNavigationBarPreference.setEnabled(true);
-
-                            // Set the icons according to the theme.
-                            if (MainWebViewActivity.darkTheme) {  // Use the dark theme.
-                                // Set the `hideSystemBarsPreference` icon.
-                                hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_disabled_dark);
-
-                                // Set the `translucentNavigationBarPreference` icon.
-                                if (sharedPreferences.getBoolean("translucent_navigation_bar", true)) {
-                                    translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_enabled_dark);
-                                } else {
-                                    translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_disabled_dark);
-                                }
-                            } else {  // Use the light theme.
-                                // Set the `hideSystemBarsPreference` icon.
-                                hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_disabled_light);
-
-                                // Set the `translucentNavigationBarPreference` icon.
-                                if (sharedPreferences.getBoolean("translucent_navigation_bar", true)) {
-                                    translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_enabled_light);
-                                } else {
-                                    translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_disabled_light);
-                                }
+                        } else {  // Hide app bar is disabled.
+                            // Set the icon according to the theme.
+                            if (MainWebViewActivity.darkTheme) {
+                                hideAppBarPreference.setIcon(R.drawable.app_bar_disabled_dark);
+                            } else {
+                                hideAppBarPreference.setIcon(R.drawable.app_bar_disabled_light);
                             }
                         }
-                    } else {  // `full_screen_browsing_mode` is false.
-                        // Disable `translucentNavigationBarPreference`.
-                        translucentNavigationBarPreference.setEnabled(false);
-
+                    } else {  // Full screen browsing is disabled.
                         // Update the icons according to the theme.
                         if (MainWebViewActivity.darkTheme) {
                             fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_disabled_dark);
-                            hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_ghosted_dark);
-                            translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted_dark);
+                            hideAppBarPreference.setIcon(R.drawable.app_bar_ghosted_dark);
                         } else {
                             fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_disabled_light);
-                            hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_ghosted_light);
-                            translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted_light);
+                            hideAppBarPreference.setIcon(R.drawable.app_bar_ghosted_light);
                         }
                     }
                     break;
 
-                case "hide_system_bars":
-                    if (sharedPreferences.getBoolean("hide_system_bars", false)) {
-                        // Disable `translucentNavigationBarPreference`.
-                        translucentNavigationBarPreference.setEnabled(false);
-
-                        // Set the icons according to the theme.
-                        if (MainWebViewActivity.darkTheme) {
-                            hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_enabled_dark);
-                            translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted_dark);
-                        } else {
-                            hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_enabled_light);
-                            translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted_light);
-                        }
-                    } else {  // `hide_system_bars` is false.
-                        // Enable `translucentNavigationBarPreference`.
-                        translucentNavigationBarPreference.setEnabled(true);
-
-                        // Set the icons according to the theme.
-                        if (MainWebViewActivity.darkTheme) {
-                            // Set the `hideSystemBarsPreference` icon.
-                            hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_disabled_dark);
-
-                            // Set the `translucentNavigationBarPreference` icon.
-                            if (sharedPreferences.getBoolean("translucent_navigation_bar", true)) {
-                                translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_enabled_dark);
-                            } else {
-                                translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_disabled_dark);
-                            }
-                        } else {
-                            // Set the `hideSystemBarsPreference` icon.
-                            hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_disabled_light);
-
-                            // Set the `translucentNavigationBarPreference` icon.
-                            if (sharedPreferences.getBoolean("translucent_navigation_bar", true)) {
-                                translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_enabled_light);
-                            } else {
-                                translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_disabled_light);
-                            }
-                        }
-                    }
-                    break;
-
-                case "translucent_navigation_bar":
+                case "hide_app_bar":
                     // Update the icon.
-                    if (sharedPreferences.getBoolean("translucent_navigation_bar", true)) {
+                    if (sharedPreferences.getBoolean("hide_app_bar", true)) {  // Hide app bar is enabled.
+                        // Set the icon according to the theme.
                         if (MainWebViewActivity.darkTheme) {
-                            translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_enabled_dark);
+                            hideAppBarPreference.setIcon(R.drawable.app_bar_enabled_dark);
                         } else {
-                            translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_enabled_light);
+                            hideAppBarPreference.setIcon(R.drawable.app_bar_enabled_light);
                         }
-                    } else {
+                    } else {  // Hide app bar is disabled.
+                        // Set the icon according to the theme.
                         if (MainWebViewActivity.darkTheme) {
-                            translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_disabled_dark);
+                            hideAppBarPreference.setIcon(R.drawable.app_bar_disabled_dark);
                         } else {
-                            translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_disabled_light);
+                            hideAppBarPreference.setIcon(R.drawable.app_bar_disabled_light);
                         }
                     }
                     break;
@@ -1492,19 +1415,19 @@ public class SettingsFragment extends PreferenceFragment {
                     }
                     break;
 
-                case "download_with_external_app":
+                case "scroll_app_bar":
                     // Update the icon.
-                    if (sharedPreferences.getBoolean("download_with_external_app", false)) {
+                    if (sharedPreferences.getBoolean("scroll_app_bar", true)) {
                         if (MainWebViewActivity.darkTheme) {
-                            downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_enabled_dark);
+                            scrollAppBarPreference.setIcon(R.drawable.app_bar_enabled_dark);
                         } else {
-                            downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_enabled_light);
+                            scrollAppBarPreference.setIcon(R.drawable.app_bar_enabled_light);
                         }
                     } else {
                         if (MainWebViewActivity.darkTheme) {
-                            downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_disabled_dark);
+                            scrollAppBarPreference.setIcon(R.drawable.app_bar_disabled_dark);
                         } else {
-                            downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_disabled_light);
+                            scrollAppBarPreference.setIcon(R.drawable.app_bar_disabled_light);
                         }
                     }
                     break;
@@ -1526,6 +1449,23 @@ public class SettingsFragment extends PreferenceFragment {
                     }
                     break;
 
+                case "download_with_external_app":
+                    // Update the icon.
+                    if (sharedPreferences.getBoolean("download_with_external_app", false)) {
+                        if (MainWebViewActivity.darkTheme) {
+                            downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_enabled_dark);
+                        } else {
+                            downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_enabled_light);
+                        }
+                    } else {
+                        if (MainWebViewActivity.darkTheme) {
+                            downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_disabled_dark);
+                        } else {
+                            downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_disabled_light);
+                        }
+                    }
+                    break;
+
                 case "dark_theme":
                     // Update the icon.
                     if (sharedPreferences.getBoolean("dark_theme", false)) {
@@ -1631,8 +1571,7 @@ public class SettingsFragment extends PreferenceFragment {
         savedPreferences.registerOnSharedPreferenceChangeListener(preferencesListener);
     }
 
-    // It is necessary to re-register the listener on every resume or it will randomly stop working because apps can be paused and resumed at any time
-    // even while running in the foreground.
+    // It is necessary to re-register the listener on every resume or it will randomly stop working because apps can be paused and resumed at any time, even while running in the foreground.
     @Override
     public void onPause() {
         super.onPause();
index 4f9d2573f1e98a3b22426fe64e8d9d2108622892..d1fbe293737841393d343b14a9d36b4d77d82edb 100644 (file)
@@ -38,7 +38,7 @@ public class ImportExportDatabaseHelper {
     public static final String EXPORT_SUCCESSFUL = "Export Successful";
     public static final String IMPORT_SUCCESSFUL = "Import Successful";
 
-    private static final int SCHEMA_VERSION = 4;
+    private static final int SCHEMA_VERSION = 5;
     private static final String PREFERENCES_TABLE = "preferences";
 
     // The preferences constants.
@@ -66,8 +66,7 @@ public class ImportExportDatabaseHelper {
     private static final String SEARCH = "search";
     private static final String SEARCH_CUSTOM_URL = "search_custom_url";
     private static final String FULL_SCREEN_BROWSING_MODE = "full_screen_browsing_mode";
-    private static final String HIDE_SYSTEM_BARS = "hide_system_bars";
-    private static final String TRANSLUCENT_NAVIGATION_BAR = "translucent_navigation_bar";
+    private static final String HIDE_APP_BAR = "hide_app_bar";
     private static final String CLEAR_EVERYTHING = "clear_everything";
     private static final String CLEAR_COOKIES = "clear_cookies";
     private static final String CLEAR_DOM_STORAGE = "clear_dom_storage";
@@ -76,8 +75,9 @@ public class ImportExportDatabaseHelper {
     private static final String HOMEPAGE = "homepage";
     private static final String FONT_SIZE = "font_size";
     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 DISPLAY_ADDITIONAL_APP_BAR_ICONS = "display_additional_app_bar_icons";
+    private static final String DOWNLOAD_WITH_EXTERNAL_APP = "download_with_external_app";
     private static final String DARK_THEME = "dark_theme";
     private static final String NIGHT_MODE = "night_mode";
     private static final String DISPLAY_WEBPAGE_IMAGES = "display_webpage_images";
@@ -214,8 +214,7 @@ public class ImportExportDatabaseHelper {
                     SEARCH + " TEXT, " +
                     SEARCH_CUSTOM_URL + " TEXT, " +
                     FULL_SCREEN_BROWSING_MODE + " BOOLEAN, " +
-                    HIDE_SYSTEM_BARS + " BOOLEAN, " +
-                    TRANSLUCENT_NAVIGATION_BAR + " BOOLEAN, " +
+                    HIDE_APP_BAR + " BOOLEAN, " +
                     CLEAR_EVERYTHING + " BOOLEAN, " +
                     CLEAR_COOKIES + " BOOLEAN, " +
                     CLEAR_DOM_STORAGE + " BOOLEAN, " +
@@ -224,8 +223,9 @@ public class ImportExportDatabaseHelper {
                     HOMEPAGE + " TEXT, " +
                     FONT_SIZE + " TEXT, " +
                     SWIPE_TO_REFRESH + " BOOLEAN, " +
-                    DOWNLOAD_WITH_EXTERNAL_APP + " BOOLEAN, " +
+                    SCROLL_APP_BAR + " BOOLEAN, " +
                     DISPLAY_ADDITIONAL_APP_BAR_ICONS + " BOOLEAN, " +
+                    DOWNLOAD_WITH_EXTERNAL_APP + " BOOLEAN, " +
                     DARK_THEME + " BOOLEAN, " +
                     NIGHT_MODE + " BOOLEAN, " +
                     DISPLAY_WEBPAGE_IMAGES + " BOOLEAN)";
@@ -261,8 +261,7 @@ public class ImportExportDatabaseHelper {
             preferencesContentValues.put(SEARCH, sharedPreferences.getString(SEARCH, context.getString(R.string.search_default_value)));
             preferencesContentValues.put(SEARCH_CUSTOM_URL, sharedPreferences.getString(SEARCH_CUSTOM_URL, context.getString(R.string.search_custom_url_default_value)));
             preferencesContentValues.put(FULL_SCREEN_BROWSING_MODE, sharedPreferences.getBoolean(FULL_SCREEN_BROWSING_MODE, false));
-            preferencesContentValues.put(HIDE_SYSTEM_BARS, sharedPreferences.getBoolean(HIDE_SYSTEM_BARS, false));
-            preferencesContentValues.put(TRANSLUCENT_NAVIGATION_BAR, sharedPreferences.getBoolean(TRANSLUCENT_NAVIGATION_BAR, true));
+            preferencesContentValues.put(HIDE_APP_BAR, sharedPreferences.getBoolean(HIDE_APP_BAR, true));
             preferencesContentValues.put(CLEAR_EVERYTHING, sharedPreferences.getBoolean(CLEAR_EVERYTHING, true));
             preferencesContentValues.put(CLEAR_COOKIES, sharedPreferences.getBoolean(CLEAR_COOKIES, true));
             preferencesContentValues.put(CLEAR_DOM_STORAGE, sharedPreferences.getBoolean(CLEAR_DOM_STORAGE, true));
@@ -271,8 +270,9 @@ public class ImportExportDatabaseHelper {
             preferencesContentValues.put(HOMEPAGE, sharedPreferences.getString(HOMEPAGE, context.getString(R.string.homepage_default_value)));
             preferencesContentValues.put(FONT_SIZE, sharedPreferences.getString(FONT_SIZE, context.getString(R.string.font_size_default_value)));
             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(DISPLAY_ADDITIONAL_APP_BAR_ICONS, sharedPreferences.getBoolean(DISPLAY_ADDITIONAL_APP_BAR_ICONS, false));
+            preferencesContentValues.put(DOWNLOAD_WITH_EXTERNAL_APP, sharedPreferences.getBoolean(DOWNLOAD_WITH_EXTERNAL_APP, false));
             preferencesContentValues.put(DARK_THEME, sharedPreferences.getBoolean(DARK_THEME, false));
             preferencesContentValues.put(NIGHT_MODE, sharedPreferences.getBoolean(NIGHT_MODE, false));
             preferencesContentValues.put(DISPLAY_WEBPAGE_IMAGES, sharedPreferences.getBoolean(DISPLAY_WEBPAGE_IMAGES, true));
@@ -360,7 +360,7 @@ public class ImportExportDatabaseHelper {
                         // Get the current setting for downloading with an external app.
                         boolean downloadWithExternalApp = sharedPreferences.getBoolean("download_with_external_app", false);
 
-                        // Set the download with external app preference to the current default.
+                        // Set the download with external app preference to the current value.
                         if (downloadWithExternalApp) {
                             importDatabase.execSQL("UPDATE " + PREFERENCES_TABLE + " SET " + DOWNLOAD_WITH_EXTERNAL_APP + " = " + 1);
                         } else {
@@ -391,10 +391,34 @@ public class ImportExportDatabaseHelper {
                         // Place the font size string in the new column.
                         importDatabase.execSQL("UPDATE " + PREFERENCES_TABLE + " SET " + FONT_SIZE + " = " + fontSize);
 
+                    // Upgrade from schema version 3.
                     case 3:
-                        // Add the Pinned IP Addresses columns.
+                        // Add the Pinned IP Addresses columns to the domains table.
                         importDatabase.execSQL("ALTER TABLE " + DomainsDatabaseHelper.DOMAINS_TABLE + " ADD COLUMN " + DomainsDatabaseHelper.PINNED_IP_ADDRESSES + " BOOLEAN");
                         importDatabase.execSQL("ALTER TABLE " + DomainsDatabaseHelper.DOMAINS_TABLE + " ADD COLUMN " + DomainsDatabaseHelper.IP_ADDRESSES + " TEXT");
+
+                    // Upgrade from schema version 4.
+                    case 4:
+                        // Add the hide and scroll app bar preferences.
+                        importDatabase.execSQL("ALTER TABLE " + PREFERENCES_TABLE + " ADD COLUMN " + HIDE_APP_BAR + " BOOLEAN");
+                        importDatabase.execSQL("ALTER TABLE " + PREFERENCES_TABLE + " ADD COLUMN " + SCROLL_APP_BAR + " BOOLEAN");
+
+                        // Get the current hide and scroll app bar settings.
+                        boolean hideAppBar = sharedPreferences.getBoolean("hide_app_bar", true);
+                        boolean scrollAppBar = sharedPreferences.getBoolean("scroll_app_bar", true);
+
+                        // Populate the database with the current values.
+                        if (hideAppBar) {
+                            importDatabase.execSQL("UPDATE " + PREFERENCES_TABLE + " SET " + HIDE_APP_BAR + " = " + 1);
+                        } else {
+                            importDatabase.execSQL("UPDATE " + PREFERENCES_TABLE + " SET " + HIDE_APP_BAR + " = " + 0);
+                        }
+
+                        if (scrollAppBar) {
+                            importDatabase.execSQL("UPDATE " + PREFERENCES_TABLE + " SET " + SCROLL_APP_BAR + " = " + 1);
+                        } else {
+                            importDatabase.execSQL("UPDATE " + PREFERENCES_TABLE + " SET " + SCROLL_APP_BAR + " = " + 0);
+                        }
                 }
             }
 
@@ -531,8 +555,7 @@ public class ImportExportDatabaseHelper {
                     .putString(SEARCH, importPreferencesCursor.getString(importPreferencesCursor.getColumnIndex(SEARCH)))
                     .putString(SEARCH_CUSTOM_URL, importPreferencesCursor.getString(importPreferencesCursor.getColumnIndex(SEARCH_CUSTOM_URL)))
                     .putBoolean(FULL_SCREEN_BROWSING_MODE, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(FULL_SCREEN_BROWSING_MODE)) == 1)
-                    .putBoolean(HIDE_SYSTEM_BARS, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(HIDE_SYSTEM_BARS)) == 1)
-                    .putBoolean(TRANSLUCENT_NAVIGATION_BAR, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(TRANSLUCENT_NAVIGATION_BAR)) == 1)
+                    .putBoolean(HIDE_APP_BAR, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(HIDE_APP_BAR)) == 1)
                     .putBoolean(CLEAR_EVERYTHING, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(CLEAR_EVERYTHING)) == 1)
                     .putBoolean(CLEAR_COOKIES, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(CLEAR_COOKIES)) == 1)
                     .putBoolean(CLEAR_DOM_STORAGE, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(CLEAR_DOM_STORAGE)) == 1)
@@ -542,8 +565,9 @@ public class ImportExportDatabaseHelper {
                     .putString(HOMEPAGE, importPreferencesCursor.getString(importPreferencesCursor.getColumnIndex(HOMEPAGE)))
                     .putString(FONT_SIZE, importPreferencesCursor.getString(importPreferencesCursor.getColumnIndex(FONT_SIZE)))
                     .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(DISPLAY_ADDITIONAL_APP_BAR_ICONS, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(DISPLAY_ADDITIONAL_APP_BAR_ICONS)) == 1)
+                    .putBoolean(DOWNLOAD_WITH_EXTERNAL_APP, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(DOWNLOAD_WITH_EXTERNAL_APP)) == 1)
                     .putBoolean(DARK_THEME, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(DARK_THEME)) == 1)
                     .putBoolean(NIGHT_MODE, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(NIGHT_MODE)) == 1)
                     .putBoolean(DISPLAY_WEBPAGE_IMAGES, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(DISPLAY_WEBPAGE_IMAGES)) == 1)
index ea94571aa834a6924e4d79b7f1b6c40fe2b789d4..44bc9ef105bb20649110ad4866f4cdcaf8f9c799 100644 (file)
@@ -36,7 +36,6 @@ public class NestedScrollWebView extends WebView implements NestedScrollingChild
     // The previous Y position needs to be tracked between motion events.
     private int previousYPosition;
 
-
     // Basic constructor.
     public NestedScrollWebView(Context context) {
         // Roll up to the next constructor.
@@ -61,7 +60,6 @@ public class NestedScrollWebView extends WebView implements NestedScrollingChild
         nestedScrollingChildHelper.setNestedScrollingEnabled(true);
     }
 
-
     @Override
     public boolean onTouchEvent(MotionEvent motionEvent) {
         // Initialize a tracker to return if this motion event is handled.
@@ -82,19 +80,43 @@ public class NestedScrollWebView extends WebView implements NestedScrollingChild
 
             case MotionEvent.ACTION_MOVE:
                 // Get the current Y position.
-                int currentYPosition = (int) motionEvent.getY();
+                int currentYMotionPosition = (int) motionEvent.getY();
+
+                // Calculate the pre-scroll delta Y.
+                int preScrollDeltaY = previousYPosition - currentYMotionPosition;
+
+                // Initialize a variable to track how much of the scroll is consumed.
+                int[] consumedScroll = new int[2];
+
+                // Initialize a variable to track the offset in the window.
+                int[] offsetInWindow = new int[2];
+
+                // Get the WebView Y position.
+                int webViewYPosition = getScrollY();
 
-                // Calculate the delta Y.
-                int deltaY = previousYPosition - currentYPosition;
+                // Set the scroll delta Y to initially be the same as the pre-scroll delta Y.
+                int scrollDeltaY = preScrollDeltaY;
 
-                // Store the current Y position for use in the next action move.
-                previousYPosition = currentYPosition;
+                // Dispatch the nested pre-school.  This scrolls the app bar if it needs it.  `offsetInWindow` will be returned with an updated value.
+                if (dispatchNestedPreScroll(0, preScrollDeltaY, consumedScroll, offsetInWindow)) {
+                    // Update the scroll delta Y if some of it was consumed.
+                    scrollDeltaY = preScrollDeltaY - consumedScroll[1];
+                }
 
-                // Dispatch the nested pre-school.
-                dispatchNestedPreScroll(0, deltaY, null, null);
+                // Check to see if the WebView is at the top and and the scroll action is downward.
+                if ((webViewYPosition == 0) && (scrollDeltaY < 0)) {  // Swipe to refresh is being engaged.
+                    // Stop the nested scroll so that swipe to refresh has complete control.
+                    stopNestedScroll();
+                } else {  // Swipe to refresh is not being engaged.
+                    // Start the nested scroll so that the app bar can scroll off the screen.
+                    startNestedScroll(ViewCompat.SCROLL_AXIS_VERTICAL);
 
-                // Dispatch the nested scroll.
-                dispatchNestedScroll(0, deltaY, 0, 0, null);
+                    // Dispatch the nested scroll.  This scrolls the WebView.  The delta Y unconsumed normally controls the swipe refresh layout, but that is handled with the `if` statement above.
+                    dispatchNestedScroll(0, scrollDeltaY, 0, 0, offsetInWindow);
+
+                    // Store the current Y position for use in the next action move.
+                    previousYPosition = previousYPosition - scrollDeltaY;
+                }
 
                 // Run the default commands.
                 motionEventHandled = super.onTouchEvent(motionEvent);
@@ -109,10 +131,19 @@ public class NestedScrollWebView extends WebView implements NestedScrollingChild
                 motionEventHandled = super.onTouchEvent(motionEvent);
         }
 
+        // Perform a click.  This is required by the Android accessibility guidelines.
+        performClick();
+
         // Return the status of the motion event.
         return motionEventHandled;
     }
 
+    // The Android accessibility guidelines require overriding `performClick()` and calling it from `onTouchEvent()`.
+    @Override
+    public boolean performClick() {
+        return super.performClick();
+    }
+
 
     // Method from NestedScrollingChild.
     @Override
diff --git a/app/src/main/res/drawable/app_bar_disabled_dark.xml b/app/src/main/res/drawable/app_bar_disabled_dark.xml
new file mode 100644 (file)
index 0000000..a4f01a9
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- `app_bar_disabled_dark.xml` 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" >
+
+    <!-- A hard coded color must be used until the minimum API >= 21.  Then `@color` 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>
diff --git a/app/src/main/res/drawable/app_bar_disabled_light.xml b/app/src/main/res/drawable/app_bar_disabled_light.xml
new file mode 100644 (file)
index 0000000..2f23e4f
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- `app_bar_disabled_light.xml` 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" >
+
+    <!-- A hard coded color must be used until the minimum API >= 21.  Then `@color` may be used instead. -->
+    <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>
diff --git a/app/src/main/res/drawable/app_bar_enabled_dark.xml b/app/src/main/res/drawable/app_bar_enabled_dark.xml
new file mode 100644 (file)
index 0000000..efca7b2
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- `app_bar_enabled_dark.xml` 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" >
+
+    <!-- A hard coded color must be used until the minimum API >= 21.  Then `@color` may be used instead. -->
+    <path
+        android:fillColor="#FF1E88E5"
+        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>
diff --git a/app/src/main/res/drawable/app_bar_enabled_light.xml b/app/src/main/res/drawable/app_bar_enabled_light.xml
new file mode 100644 (file)
index 0000000..c0751cd
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- `app_bar_enabled_light.xml` 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" >
+
+    <!-- A hard coded color must be used until the minimum API >= 21.  Then `@color` may be used instead. -->
+    <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>
diff --git a/app/src/main/res/drawable/app_bar_ghosted_dark.xml b/app/src/main/res/drawable/app_bar_ghosted_dark.xml
new file mode 100644 (file)
index 0000000..a854f04
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- `app_bar_ghosted_dark.xml` 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" >
+
+    <!-- A hard coded color must be used until the minimum API >= 21.  Then `@color` may be used instead. -->
+    <path
+        android:fillColor="#FF616161"
+        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>
diff --git a/app/src/main/res/drawable/app_bar_ghosted_light.xml b/app/src/main/res/drawable/app_bar_ghosted_light.xml
new file mode 100644 (file)
index 0000000..fba36f5
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- `app_bar_ghosted_light.xml` 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" >
+
+    <!-- A hard coded color must be used until the minimum API >= 21.  Then `@color` may be used instead. -->
+    <path
+        android:fillColor="#FFB7B7B7"
+        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>
index 713f2fdbd6f71b2df4bc0be8354765c2e584bffa..7237961917e51d88a7d19779c2403e1fd013e00c 100644 (file)
@@ -6,7 +6,7 @@
     android:viewportHeight="24.0"
     android:viewportWidth="24.0" >
 
-    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
+    <!-- A hard coded color must be used until the minimum API >= 21.  Then `@color` may be used instead. -->
     <path
         android:fillColor="#FF9E9E9E"
         android:pathData="M17,1.01L7,1c-1.1,0 -2,0.9 -2,2v18c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2V3c0,-1.1 -0.9,-1.99 -2,-1.99zM17,19H7V5h10v14z"/>
index 74674ef5f20c639a0ff115265098931d2aa287c7..a29123f87bbcab51d2d3621f571ba65f6c716828 100644 (file)
@@ -6,7 +6,7 @@
     android:viewportHeight="24.0"
     android:viewportWidth="24.0" >
 
-    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
+    <!-- A hard coded color must be used until the minimum API >= 21.  Then `@color` may be used instead. -->
     <path
         android:fillColor="#FF757575"
         android:pathData="M17,1.01L7,1c-1.1,0 -2,0.9 -2,2v18c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2V3c0,-1.1 -0.9,-1.99 -2,-1.99zM17,19H7V5h10v14z"/>
index dd54e5ed7141a9a6418c67e9670ccccfaf62ebd3..10998caa6456a91cf88b354cb3409642c8ca3b1f 100644 (file)
@@ -6,7 +6,7 @@
     android:viewportHeight="24.0"
     android:viewportWidth="24.0" >
 
-    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
+    <!-- A hard coded color must be used until the minimum API >= 21.  Then `@color` may be used instead. -->
     <path
         android:fillColor="#FF1E88E5"
         android:pathData="M17,1.01L7,1c-1.1,0 -2,0.9 -2,2v18c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2V3c0,-1.1 -0.9,-1.99 -2,-1.99zM17,19H7V5h10v14z"/>
index 09d7465902fe99378ecaa4ec2c21b7d00c8961cf..533294279c21df3ad4041faf984f412b3e8c7dcc 100644 (file)
@@ -6,7 +6,7 @@
     android:viewportHeight="24.0"
     android:viewportWidth="24.0" >
 
-    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
+    <!-- A hard coded color must be used until the minimum API >= 21.  Then `@color` may be used instead. -->
     <path
         android:fillColor="#FF1565C0"
         android:pathData="M17,1.01L7,1c-1.1,0 -2,0.9 -2,2v18c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2V3c0,-1.1 -0.9,-1.99 -2,-1.99zM17,19H7V5h10v14z"/>
diff --git a/app/src/main/res/drawable/hide_system_bars_disabled_dark.xml b/app/src/main/res/drawable/hide_system_bars_disabled_dark.xml
deleted file mode 100644 (file)
index e9a524f..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- `hide_system_bars_disabled_dark.xml` comes from the Android Material icon set, where it is called `fullscreen`.  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.0"
-    android:viewportWidth="24.0" >
-
-    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
-    <path
-        android:fillColor="#FF9E9E9E"
-        android:pathData="M7,14L5,14v5h5v-2L7,17v-3zM5,10h2L7,7h3L10,5L5,5v5zM17,17h-3v2h5v-5h-2v3zM14,5v2h3v3h2L19,5h-5z"/>
-</vector>
diff --git a/app/src/main/res/drawable/hide_system_bars_disabled_light.xml b/app/src/main/res/drawable/hide_system_bars_disabled_light.xml
deleted file mode 100644 (file)
index 553b264..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- `hide_system_bars_disabled_light.xml` comes from the Android Material icon set, where it is called `fullscreen`.  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.0"
-    android:viewportWidth="24.0" >
-
-    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
-    <path
-        android:fillColor="#FF757575"
-        android:pathData="M7,14L5,14v5h5v-2L7,17v-3zM5,10h2L7,7h3L10,5L5,5v5zM17,17h-3v2h5v-5h-2v3zM14,5v2h3v3h2L19,5h-5z"/>
-</vector>
diff --git a/app/src/main/res/drawable/hide_system_bars_enabled_dark.xml b/app/src/main/res/drawable/hide_system_bars_enabled_dark.xml
deleted file mode 100644 (file)
index 24036ba..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- `hide_system_bars_enabled_dark.xml` comes from the Android Material icon set, where it is called `fullscreen`.  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.0"
-    android:viewportWidth="24.0" >
-
-    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
-    <path
-        android:fillColor="#FF1E88E5"
-        android:pathData="M7,14L5,14v5h5v-2L7,17v-3zM5,10h2L7,7h3L10,5L5,5v5zM17,17h-3v2h5v-5h-2v3zM14,5v2h3v3h2L19,5h-5z"/>
-</vector>
diff --git a/app/src/main/res/drawable/hide_system_bars_enabled_light.xml b/app/src/main/res/drawable/hide_system_bars_enabled_light.xml
deleted file mode 100644 (file)
index c095ea4..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- `hide_system_bars_enabled_light.xml` comes from the Android Material icon set, where it is called `fullscreen`.  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.0"
-    android:viewportWidth="24.0" >
-
-    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
-    <path
-        android:fillColor="#FF1565C0"
-        android:pathData="M7,14L5,14v5h5v-2L7,17v-3zM5,10h2L7,7h3L10,5L5,5v5zM17,17h-3v2h5v-5h-2v3zM14,5v2h3v3h2L19,5h-5z"/>
-</vector>
diff --git a/app/src/main/res/drawable/hide_system_bars_ghosted_dark.xml b/app/src/main/res/drawable/hide_system_bars_ghosted_dark.xml
deleted file mode 100644 (file)
index 32d6bae..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- `hide_system_bars_ghosted_dark.xml` comes from the Android Material icon set, where it is called `fullscreen`.  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.0"
-    android:viewportWidth="24.0" >
-
-    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
-    <path
-        android:fillColor="#FF616161"
-        android:pathData="M7,14L5,14v5h5v-2L7,17v-3zM5,10h2L7,7h3L10,5L5,5v5zM17,17h-3v2h5v-5h-2v3zM14,5v2h3v3h2L19,5h-5z"/>
-</vector>
diff --git a/app/src/main/res/drawable/hide_system_bars_ghosted_light.xml b/app/src/main/res/drawable/hide_system_bars_ghosted_light.xml
deleted file mode 100644 (file)
index 28f0372..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- `hide_system_bars_ghosted_light.xml` comes from the Android Material icon set, where it is called `fullscreen`.  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.0"
-    android:viewportWidth="24.0" >
-
-    <!-- We have to use a hard coded color until API >= 21.  Then we can use `@color`. -->
-    <path
-        android:fillColor="#FFB7B7B7"
-        android:pathData="M7,14L5,14v5h5v-2L7,17v-3zM5,10h2L7,7h3L10,5L5,5v5zM17,17h-3v2h5v-5h-2v3zM14,5v2h3v3h2L19,5h-5z"/>
-</vector>
diff --git a/app/src/main/res/drawable/translucent_bar_disabled_dark.xml b/app/src/main/res/drawable/translucent_bar_disabled_dark.xml
deleted file mode 100644 (file)
index ad6341a..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- `translucent_bar_disabled_dark.xml` 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.0"
-    android:viewportWidth="24.0" >
-
-    <!-- A hard coded color must be used until API >= 21.  Then `@color` can be used. -->
-    <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>
diff --git a/app/src/main/res/drawable/translucent_bar_disabled_light.xml b/app/src/main/res/drawable/translucent_bar_disabled_light.xml
deleted file mode 100644 (file)
index 3b20362..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- `translucent_bar_disabled_light.xml` 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.0"
-    android:viewportWidth="24.0" >
-
-    <!-- A hard coded color must be used until API >= 21.  Then `@color` can be used. -->
-    <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>
diff --git a/app/src/main/res/drawable/translucent_bar_enabled_dark.xml b/app/src/main/res/drawable/translucent_bar_enabled_dark.xml
deleted file mode 100644 (file)
index b44db6d..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- `translucent_bar_enabled_dark.xml` 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.0"
-    android:viewportWidth="24.0" >
-
-    <!-- A hard coded color must be used until API >= 21.  Then `@color` can be used. -->
-    <path
-        android:fillColor="#FF1E88E5"
-        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>
diff --git a/app/src/main/res/drawable/translucent_bar_enabled_light.xml b/app/src/main/res/drawable/translucent_bar_enabled_light.xml
deleted file mode 100644 (file)
index 0b48dfb..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- `translucent_bar_enabled_light.xml` 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.0"
-    android:viewportWidth="24.0" >
-
-    <!-- A hard coded color must be used until API >= 21.  Then `@color` can be used. -->
-    <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>
diff --git a/app/src/main/res/drawable/translucent_bar_ghosted_dark.xml b/app/src/main/res/drawable/translucent_bar_ghosted_dark.xml
deleted file mode 100644 (file)
index 153d280..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- `translucent_bar_ghosted_dark.xml` 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.0"
-    android:viewportWidth="24.0" >
-
-    <!-- A hard coded color must be used until API >= 21.  Then `@color` can be used. -->
-    <path
-        android:fillColor="#FF616161"
-        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>
diff --git a/app/src/main/res/drawable/translucent_bar_ghosted_light.xml b/app/src/main/res/drawable/translucent_bar_ghosted_light.xml
deleted file mode 100644 (file)
index 4ae17b6..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!-- `translucent_bar_ghosted_light.xml` 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.0"
-    android:viewportWidth="24.0" >
-
-    <!-- A hard coded color must be used until API >= 21.  Then `@color` can be used. -->
-    <path
-        android:fillColor="#FFB7B7B7"
-        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>
index aafac66eaa70b91928206c066798c54780996769..fdd097042efc612840bcb2098ab533bdae5cddc6 100644 (file)
@@ -28,7 +28,7 @@
 
     <LinearLayout
         android:layout_height="match_parent"
-        android:layout_width="wrap_content"
+        android:layout_width="match_parent"
         android:orientation="vertical" >
 
         <TextView
@@ -49,7 +49,7 @@
             android:dividerHeight="0dp" />
     </LinearLayout>
 
-    <com.google.android.material.FloatingActionButton
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
         android:id="@+id/launch_bookmarks_activity_fab"
         android:layout_height="wrap_content"
         android:layout_width="wrap_content"
@@ -57,7 +57,7 @@
         android:layout_marginEnd="16dp"
         android:layout_marginBottom="155dp" />
 
-    <com.google.android.material.FloatingActionButton
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
         android:id="@+id/create_bookmark_folder_fab"
         android:layout_height="wrap_content"
         android:layout_width="wrap_content"
@@ -65,7 +65,7 @@
         android:layout_marginEnd="16dp"
         android:layout_marginBottom="85dp" />
 
-    <com.google.android.material.FloatingActionButton
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
         android:id="@+id/create_bookmark_fab"
         android:layout_height="wrap_content"
         android:layout_width="wrap_content"
diff --git a/app/src/main/res/layout/adview.xml b/app/src/main/res/layout/adview.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
index cd6e198c53ae7abca6ea75f731056b397edf481b..58a0c1197864c626f8a7561e87992d42d795a1d9 100644 (file)
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/bookmarks_framelayout"
     android:layout_height="match_parent"
-    android:layout_width="wrap_content"
+    android:layout_width="match_parent"
     android:layout_gravity="end" >
 
     <LinearLayout
         android:layout_height="match_parent"
-        android:layout_width="wrap_content"
+        android:layout_width="match_parent"
         android:orientation="vertical" >
 
         <TextView
diff --git a/app/src/main/res/layout/find_on_page_app_bar.xml b/app/src/main/res/layout/find_on_page_app_bar.xml
deleted file mode 100644 (file)
index 8b2a510..0000000
+++ /dev/null
@@ -1,88 +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/>. -->
-
-<!-- `LinearLayout` is initially `visibility="gone"` so the `url_app_bar` is visible. -->
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    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" />
-
-    <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:tint="?attr/findOnPageIconTintColor"
-        android:contentDescription="@string/previous"
-        android:onClick="findPreviousOnPage" />
-
-    <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:tint="?attr/findOnPageIconTintColor"
-        android:contentDescription="@string/next"
-        android:onClick="findNextOnPage" />
-
-    <ImageView
-        android:id="@+id/close_find"
-        android:src="@drawable/close_light"
-        android:layout_width="35dp"
-        android:layout_height="35dp"
-        android:layout_marginStart="4dp"
-        android:layout_marginEnd="8dp"
-        android:layout_gravity="center_vertical"
-        android:tint="?attr/findOnPageIconTintColor"
-        android:contentDescription="@string/close"
-        android:onClick="closeFindOnPage" />
-</LinearLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/main_drawerlayout.xml b/app/src/main/res/layout/main_drawerlayout.xml
deleted file mode 100644 (file)
index ba9e972..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2015-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/>. -->
-
-<androidx.drawerlayout.widget.DrawerLayout
-    android:id="@+id/drawerlayout"
-    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"` moves the toolbar below the system status bar.  When it is specified, the theme should include `<item name="android:windowTranslucentStatus">true</item>`.
-        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:id="@+id/coordinatorlayout"
-        xmlns:tools="http://schemas.android.com/tools"
-        tools:context="com.stoutner.privacybrowser.activities.MainWebViewActivity"
-        android:layout_height="match_parent"
-        android:layout_width="match_parent"
-        android:focusable="true"
-        android:focusableInTouchMode="true"
-        android:fitsSystemWindows="true" >
-
-        <!-- The `AppBarLayout` theme has to be defined here because the activity uses a `NoActionBar` theme. -->
-        <com.google.android.material.appbar.AppBarLayout
-            android:id="@+id/app_bar_layout"
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:theme="@style/PrivacyBrowserAppBarLight" >
-
-            <androidx.appcompat.widget.Toolbar
-                android:id="@+id/toolbar"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                app:layout_scrollFlags="scroll|enterAlways|snap" />
-
-            <!-- The `FrameLayout` allows `appBar` and `find_on_page_app_bar` to occupy the same space. -->
-            <!-- <FrameLayout
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent" >
-
-                <android.support.v7.widget.Toolbar
-                    android:id="@+id/app_bar"
-                    android:layout_height="wrap_content"
-                    android:layout_width="match_parent"
-                    app:layout_scrollFlags="scroll|enterAlways|snap" /> -->
-
-                <!-- `android:max` changes the maximum `ProgressBar` value from 10000 to 100 to match progress percentage.
-                    `android:layout_height="2dp"` works best for API >= 23, but `3dp` is required for visibility on API <= 22.
-                    `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="3dp"
-                    android:layout_width="match_parent"
-                    android:layout_gravity="bottom"
-                    android:max="100"
-                    android:progressTint="?attr/progressTintColor"
-                    android:progressBackgroundTint="@color/transparent"
-                    android:visibility="gone"
-                    tools:ignore="UnusedAttribute" /> -->
-
-                <!-- Include the Find on Page search bar. -->
-                <!-- <include layout="@layout/find_on_page_app_bar" />
-            </FrameLayout> -->
-        </com.google.android.material.appbar.AppBarLayout>
-
-
-        <com.stoutner.privacybrowser.views.NestedScrollWebView
-            android:id="@+id/main_webview"
-            android:layout_height="match_parent"
-            android:layout_width="match_parent"
-            android:focusable="true"
-            android:focusableInTouchMode="true"
-            app:layout_behavior="@string/appbar_scrolling_view_behavior" />
-
-        <TextView
-            android:id="@+id/adview"
-            android:layout_height="wrap_content"
-            android:layout_width="wrap_content"
-            android:visibility="gone" />
-
-        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
-            android:id="@+id/swiperefreshlayout"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent" >
-        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
-
-        <ProgressBar
-                    android:id="@+id/progress_bar"
-                    style="?android:attr/progressBarStyleHorizontal"
-                    android:layout_height="3dp"
-                    android:layout_width="match_parent"
-                    android:layout_gravity="bottom"
-                    android:max="100"
-                    android:progressTint="?attr/progressTintColor"
-                    android:progressBackgroundTint="@color/transparent"
-                    android:visibility="gone"
-                    tools:ignore="UnusedAttribute" />
-        <include layout="@layout/find_on_page_app_bar" />
-
-        <!-- Include the main `WebView`. -->
-        <!-- <include layout="@layout/main_webview" /> -->
-
-        <!-- `full_screen_video_framelayout` 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"
-            android:background="@color/black" />
-    </androidx.coordinatorlayout.widget.CoordinatorLayout>
-
-    <!-- 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:headerLayout="@layout/navigation_header"
-        app:menu="@menu/webview_navigation_menu"
-        app:itemIconTint="?attr/navigationIconTintColor" />
-
-    <!-- Include the bookmarks drawer. -->
-    <include layout="@layout/bookmarks_drawer" />
-</androidx.drawerlayout.widget.DrawerLayout>
\ 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
new file mode 100644 (file)
index 0000000..9642dec
--- /dev/null
@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2015-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/>. -->
+
+<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.
+            `android:fitsSystemWindows="true"` moves the toolbar below the system status bar but lets the drawers slide under the translucent status bar.
+            When it is specified, the theme should include `<item name="android:windowTranslucentStatus">true</item>`. -->
+        <RelativeLayout
+            android:id="@+id/main_content_relativelayout"
+            android:layout_height="match_parent"
+            android:layout_width="match_parent"
+            android:fitsSystemWindows="true" >
+
+            <!-- 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 theme has to be defined 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:theme="@style/PrivacyBrowserAppBarLight" >
+
+                    <!-- The frame layout allows the toolbar, progress bar, and find on page bar to occupy the same space.  The scroll flags should be set on the immediate child of AppBarLayout. -->
+                    <FrameLayout
+                        android:layout_height="wrap_content"
+                        android:layout_width="match_parent"
+                        app:layout_scrollFlags="scroll|enterAlways|snap" >
+
+                        <androidx.appcompat.widget.Toolbar
+                            android:id="@+id/toolbar"
+                            android:layout_height="wrap_content"
+                            android:layout_width="match_parent" />
+
+                        <!-- `android:max` changes the maximum `ProgressBar` value from 10000 to 100 to match progress percentage.
+                            `android:layout_height="2dp"` works best for API >= 23, but `3dp` is required for visibility on API <= 22.
+                            `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="3dp"
+                            android:layout_width="match_parent"
+                            android:layout_gravity="bottom"
+                            android:max="100"
+                            android:progressTint="?attr/progressTintColor"
+                            android:progressBackgroundTint="@color/transparent"
+                            android:visibility="gone"
+                            tools:ignore="UnusedAttribute" />
+
+                        <!-- The find on page linear layout.  It is initially `visibility="gone"`. -->
+                        <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" />
+
+                            <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:tint="?attr/findOnPageIconTintColor"
+                                android:contentDescription="@string/previous"
+                                android:onClick="findPreviousOnPage" />
+
+                            <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:tint="?attr/findOnPageIconTintColor"
+                                android:contentDescription="@string/next"
+                                android:onClick="findNextOnPage" />
+
+                            <ImageView
+                                android:id="@+id/close_find"
+                                android:src="@drawable/close_light"
+                                android:layout_width="35dp"
+                                android:layout_height="35dp"
+                                android:layout_marginStart="4dp"
+                                android:layout_marginEnd="8dp"
+                                android:layout_gravity="center_vertical"
+                                android:tint="?attr/findOnPageIconTintColor"
+                                android:contentDescription="@string/close"
+                                android:onClick="closeFindOnPage" />
+                        </LinearLayout>
+                    </FrameLayout>
+                </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.NestedScrollWebView
+                        android:id="@+id/main_webview"
+                        android:layout_height="match_parent"
+                        android:layout_width="match_parent"
+                        android:focusable="true"
+                        android:focusableInTouchMode="true" />
+                </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:headerLayout="@layout/navigation_header"
+            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" />
+</FrameLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/main_webview.xml b/app/src/main/res/layout/main_webview.xml
deleted file mode 100644 (file)
index 4b5b5b3..0000000
+++ /dev/null
@@ -1,54 +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/>. -->
-
-<!-- `android:layout_weight="1"` sets the `RelativeLayout` to fill the rest of the screen because it is encapsulated in a `LinearLayout` with `android:orientation="vertical"`. -->
-<!-- `android:background=@color/gray_900` sets the background color that is displayed when a website is loading in night mode. -->
-<RelativeLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_height="0dp"
-    android:layout_width="match_parent"
-    android:layout_weight="1"
-    android:background="@color/gray_900"
-    tools:context="com.stoutner.privacybrowser.activities.MainWebViewActivity"
-    xmlns:app="http://schemas.android.com/apk/res-auto">
-
-    <!-- This `TextView` has an id of `adView` so that the ad commands (which do nothing in the standard flavor) don't produce errors. -->
-    <TextView
-        android:id="@+id/adview"
-        android:layout_height="wrap_content"
-        android:layout_width="wrap_content"
-        android:visibility="gone" />
-
-    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
-        android:id="@+id/swiperefreshlayout"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" >
-
-        <!-- Google does not currently want to support hiding the AppBar on scroll for a WebView child with the Support Toolbar.  https://code.google.com/p/android/issues/detail?id=200394 -->
-        <com.stoutner.privacybrowser.views.NestedScrollWebView
-            android:id="@+id/main_webview"
-            android:layout_height="match_parent"
-            android:layout_width="match_parent"
-            android:focusable="true"
-            android:focusableInTouchMode="true"
-            app:layout_behavior="@string/appbar_scrolling_view_behavior" />
-    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
-</RelativeLayout>
\ No newline at end of file
index bb114217d9d90fd43bb52f5b8ffe8c59d299db81..63337104ac05a613afd33336bb8e7133d0ac67d5 100644 (file)
     <string name="full_screen">Pantalla completa</string>
         <string name="full_screen_browsing_mode">Navegación de pantalla completa</string>
         <string name="full_screen_browsing_mode_summary">Doble toque para alternar a modo de navegación de pantalla completa.</string>
-        <string name="hide_system_bars">Esconder barras del systema</string>
-        <string name="hide_system_bars_summary">Esconder las barras de estado y de navegación en el modo de navegación a pantalla completa.
-            Esto no funciona bien si el teclado es mostrado durante el modo de navegación a pantalla completa.</string>
-        <string name="translucent_navigation_bar">Barra de navegación translúcida</string>
-        <string name="translucent_navigation_bar_summary">Hacer la barra de navegación translúcida en el modo de navegación a pantalla completa.</string>
     <string name="clear_everything">Borrar todo</string>
         <string name="clear_everything_summary">Borra cookies, almacenamiento DOM, datos de formulario y la caché de  WebView.
             A continuación borra manualmente los directorios “app_webview” y “cache”.</string>
             </string-array>
         <string name="swipe_to_refresh">Deslizar para actualizar</string>
         <string name="swipe_to_refresh_summary">Algunas webs no funcionan bien si la opción deslizar para actualizar está habilitada.</string>
-        <string name="download_with_external_app">Descargar con app externa</string>
-        <string name="download_with_external_app_summary">El gestor de descargas de Android no funciona bien en algunos dispositivos.</string>
         <string name="display_additional_app_bar_icons">Mostrar iconos adicionales en la barra de aplicación</string>
         <string name="display_additional_app_bar_icons_summary">Mostrar iconos en la barra de aplicaciones para refrescar el WebView y, si hay espacio, para alternar entre cookies y almacenamiento DOM.</string>
+        <string name="download_with_external_app">Descargar con app externa</string>
+        <string name="download_with_external_app_summary">El gestor de descargas de Android no funciona bien en algunos dispositivos.</string>
         <string name="dark_theme">Tema oscuro</string>
         <string name="dark_theme_summary">Cambiar el tema reiniciará Navegador Privado.</string>
         <string name="night_mode">Modo noche</string>
index 79f516273ef4554f7838b585d70d49b55fcdb473..9c6a23b86641077f9766866b470bd968b04649d4 100644 (file)
     <string name="full_screen">Schermo intero</string>
         <string name="full_screen_browsing_mode">Navigazione a schermo intero</string>
         <string name="full_screen_browsing_mode_summary">Toccare due volte per avviare la navigazione a schermo intero.</string>
-        <string name="hide_system_bars">Nascondi le barre di sistema</string>
-        <string name="hide_system_bars_summary">Nasconde la barra di stato e la barra di navigazione durante la navigazione a schermo intero.
-            Questa opzione non funziona perfettamente se si visualizza la tastiera durante la navigazione a schermo intero.</string>
-        <string name="translucent_navigation_bar">Barra di navigazione trasparente</string>
-        <string name="translucent_navigation_bar_summary">Rende la barra di navigazione trasparente durante la navigazione a schermo intero.</string>
     <string name="clear_everything">Elimina tutto</string>
         <string name="clear_everything_summary">Cancella i cookies, il DOM storage, i dati dei moduli e la cache di WebView.  Cancella completamente le cartelle “app_webview” e “cache”.</string>
         <string name="clear_cookies_preference">Elimina i cookie</string>
             </string-array>
         <string name="swipe_to_refresh">Swipe per aggiornare</string>
         <string name="swipe_to_refresh_summary">Alcuni siti non funzionano correttamente se questa opzione è abilitata.</string>
-        <string name="download_with_external_app">Scarica con un\'applicazione esterna</string>
-        <string name="download_with_external_app_summary">Il download manager di Android potrebbe non funzionare correttamente su alcuni dispositivi.</string>
         <string name="display_additional_app_bar_icons">Mostra icone addizionali nella barra dell\'applicazione</string>
         <string name="display_additional_app_bar_icons_summary">Mostra nella barra dell\'applicazione le icone per l\'aggiornamento di WebView e, se lo spazio è sufficiente,
             per l\'attivazione dei cookie e del DOM storage.</string>
+        <string name="download_with_external_app">Scarica con un\'applicazione esterna</string>
+        <string name="download_with_external_app_summary">Il download manager di Android potrebbe non funzionare correttamente su alcuni dispositivi.</string>
         <string name="dark_theme">Tema Dark</string>
         <string name="dark_theme_summary">La modifica del tema provocherà il riavvio di Privacy Browser.</string>
         <string name="night_mode">Modalità Notte</string>
index a012beef1968312791ac6693e89c5bb1a34595e0..d98984761a03fe5e3bda43a4f9da1aced9c128cb 100644 (file)
     <string name="full_screen">Во весь экран</string>
         <string name="full_screen_browsing_mode">Полноэкранный режим просмотра</string>
         <string name="full_screen_browsing_mode_summary">Двойное касание переключает режим просмотра.</string>
-        <string name="hide_system_bars">Скрыть системные панели</string>
-        <string name="hide_system_bars_summary">Скрыть панели статуса и навигации в полноэкранном режиме просмотра. Это не работает при отображении клавиатуры во время полноэкранного просмотра.</string>
-        <string name="translucent_navigation_bar">Полупрозрачная навигационная панель</string>
-        <string name="translucent_navigation_bar_summary">Панель навигации станет полупрозрачной в полноэкранном режиме просмотра.</string>
     <string name="clear_everything">Очистить все</string>
         <string name="clear_everything_summary">Очищает файлы cookie, DOM-хранилище, данные формы и кэш WebView. Затем вручную удаляются все каталоги "app_webview" и "cache".</string>
         <string name="clear_cookies_preference">Очистить файлы cookie</string>
             </string-array>
         <string name="swipe_to_refresh">Потянуть для обновления</string>
         <string name="swipe_to_refresh_summary">Некоторые веб-сайты могут работать некорректно при включении данной опции.</string>
-        <string name="download_with_external_app">Загрузка с помощью внешнего приложения</string>
-        <string name="download_with_external_app_summary">Менеджер загрузок Android не работает на некоторых устройствах.</string>
         <string name="display_additional_app_bar_icons">Отображать дополнительные значки на панели приложения</string>
         <string name="display_additional_app_bar_icons_summary">Отображать значки на панели приложения для обновления WebView и, при наличии места, для переключения файлов cookie и хранилища DOM</string>
+        <string name="download_with_external_app">Загрузка с помощью внешнего приложения</string>
+        <string name="download_with_external_app_summary">Менеджер загрузок Android не работает на некоторых устройствах.</string>
         <string name="dark_theme">Темная тема</string>
         <string name="dark_theme_summary">Изменение темы перезапускает Privacy Browser.</string>
         <string name="night_mode">Ночной режим</string>
index 2ebc0987d074c7333f91004fd04c48c3dcd4f8ea..e50808f7a7ca56ea90cafcedf8ab7d15f0dd956b 100644 (file)
     <string name="full_screen">Tam Ekran</string>
         <string name="full_screen_browsing_mode">Tam ekran modu</string>
         <string name="full_screen_browsing_mode_summary">Tam ekran moduna geçmek için çift dokun.</string>
-        <string name="hide_system_bars">Sistem çubuğunu gizle</string>
-        <string name="hide_system_bars_summary">Tam ekran modunda durum ve gezinti çubuğunu gizler. Tam ekran modundayken klavye açıldığında iyi çalışmayabilir.</string>
-        <string name="translucent_navigation_bar">Yarı saydam gezinti çubuğu</string>
-        <string name="translucent_navigation_bar_summary">Gezinti çubuğunu, tam ekran modunda yarı saydam yapar.</string>
     <string name="clear_everything">Her şeyi temizle</string>
         <string name="clear_everything_summary">Çerezleri, DOM depolama alanını, form verisini ve Web Görünümü ön belleğini temizler.
             Sonrasında, manuel olarak bütün “app_webview” ve “cache” dizinlerini siler.</string>
             </string-array>
         <string name="swipe_to_refresh">Yenilemek için kaydır</string>
         <string name="swipe_to_refresh_summary">Bazı web siteleri, yenilemek için kaydır seçeneği etkin olduğunda iyi çalışmayabilir.</string>
-        <string name="download_with_external_app">Harici uygulamayla indir</string>
-        <string name="download_with_external_app_summary">Android indirme yönetecisi bazı cihazlarda iyi çalışmayabilir.</string>
         <string name="display_additional_app_bar_icons">Ek uygulama çubuğu simgelerini göster</string>
         <string name="display_additional_app_bar_icons_summary">Web Görünümünü yenilemek ve yer varsa çerezler ve DOM depolama alanını değiştirmek için uygulama çubuğunda simgeler gösterir.</string>
+        <string name="download_with_external_app">Harici uygulamayla indir</string>
+        <string name="download_with_external_app_summary">Android indirme yönetecisi bazı cihazlarda iyi çalışmayabilir.</string>
         <string name="dark_theme">Koyu tema</string>
         <string name="dark_theme_summary">Temayı değiştirmek Privacy Browser\'ı yeniden başlatacak.</string>
         <string name="night_mode">Gece modu</string>
index b8bc4f5200456f2e15546cddd7e7a425ddd76d43..c4e39018ed66a29e84eea2f1f9d11187431c0d9a 100644 (file)
     <string name="full_screen">Full Screen</string>
         <string name="full_screen_browsing_mode">Full screen browsing mode</string>
         <string name="full_screen_browsing_mode_summary">Double-tap to toggle full screen browsing mode.</string>
-        <string name="hide_system_bars">Hide system bars</string>
-        <string name="hide_system_bars_summary">Hide the status and navigation bars in full screen browsing mode.
-            This doesn’t work well if the keyboard is displayed during full screen browsing mode.</string>
-        <string name="translucent_navigation_bar">Translucent navigation bar</string>
-        <string name="translucent_navigation_bar_summary">Make the navigation bar translucent in full screen browsing mode.</string>
+        <string name="hide_app_bar">Hide the app bar</string>
+        <string name="hide_app_bar_summary">Hide the app bar that contains the URL.</string>
     <string name="clear_everything">Clear everything</string>
         <!-- The form data part of this string can be removed once the minimum API >= 26. -->
         <string name="clear_everything_summary">Clears cookies, DOM storage, form data, and WebView’s cache.  Then manually deletes the entire “app_webview” and “cache” directories.</string>
             </string-array>
         <string name="swipe_to_refresh">Swipe to refresh</string>
         <string name="swipe_to_refresh_summary">Some websites don’t work well if swipe to refresh is enabled.</string>
-        <string name="download_with_external_app">Download with external app</string>
-        <string name="download_with_external_app_summary">Android’s download manager doesn’t work well on some devices.</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="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 toggling cookies and DOM storage.</string>
+        <string name="download_with_external_app">Download with external app</string>
+        <string name="download_with_external_app_summary">Android’s download manager doesn’t work well on some devices.</string>
         <string name="dark_theme">Dark theme</string>
         <string name="dark_theme_summary">Changing the theme will restart Privacy Browser.</string>
         <string name="night_mode">Night mode</string>
index 8c24d1a70648e3bbe7cc66295d3db5cdc90cc962..6176de6067347fe73c455b332f9d33770a8c0daf 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  Copyright © 2016-2018 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2016-2019 Soren Stoutner <soren@stoutner.com>.
 
   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
 
             android:defaultValue="false" />
 
         <SwitchPreference
-            android:key="hide_system_bars"
-            android:title="@string/hide_system_bars"
-            android:summary="@string/hide_system_bars_summary"
-            android:defaultValue="false" />
-
-        <SwitchPreference
-            android:key="translucent_navigation_bar"
-            android:title="@string/translucent_navigation_bar"
-            android:summary="@string/translucent_navigation_bar_summary"
+            android:key="hide_app_bar"
+            android:title="@string/hide_app_bar"
+            android:summary="@string/hide_app_bar_summary"
             android:defaultValue="true" />
     </PreferenceCategory>
 
             android:defaultValue="true" />
 
         <SwitchPreference
-            android:key="download_with_external_app"
-            android:title="@string/download_with_external_app"
-            android:summary="@string/download_with_external_app_summary"
-            android:defaultValue="false" />
+            android:key="scroll_app_bar"
+            android:title="@string/scroll_app_bar"
+            android:summary="@string/scroll_app_bar_summary"
+            android:defaultValue="true" />
 
         <SwitchPreference
             android:key="display_additional_app_bar_icons"
             android:summary="@string/display_additional_app_bar_icons_summary"
             android:defaultValue="false" />
 
+        <SwitchPreference
+            android:key="download_with_external_app"
+            android:title="@string/download_with_external_app"
+            android:summary="@string/download_with_external_app_summary"
+            android:defaultValue="false" />
+
         <SwitchPreference
             android:key="dark_theme"
             android:title="@string/dark_theme"