Add an option to sort by display order in the bookmarks database view. https://redmi...
authorSoren Stoutner <soren@stoutner.com>
Tue, 15 Jan 2019 00:30:42 +0000 (17:30 -0700)
committerSoren Stoutner <soren@stoutner.com>
Tue, 15 Jan 2019 00:30:42 +0000 (17:30 -0700)
37 files changed:
.idea/assetWizardSettings.xml
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/sort_dark.png [new file with mode: 0644]
app/src/main/assets/shared_images/sort_light.png [new file with mode: 0644]
app/src/main/assets/shared_images/sort_selected_dark.png [new file with mode: 0644]
app/src/main/assets/shared_images/sort_selected_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/BookmarksActivity.java
app/src/main/java/com/stoutner/privacybrowser/activities/BookmarksDatabaseViewActivity.java
app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java
app/src/main/java/com/stoutner/privacybrowser/helpers/BookmarksDatabaseHelper.java
app/src/main/res/drawable/sort_dark.xml [new file with mode: 0644]
app/src/main/res/drawable/sort_light.xml [new file with mode: 0644]
app/src/main/res/drawable/sort_selected_dark.xml [new file with mode: 0644]
app/src/main/res/drawable/sort_selected_light.xml [new file with mode: 0644]
app/src/main/res/drawable/theme_dark.xml
app/src/main/res/drawable/theme_light.xml
app/src/main/res/menu/bookmarks_databaseview_options_menu.xml [new file with mode: 0644]
app/src/main/res/menu/webview_options_menu.xml
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-v21/styles.xml
app/src/main/res/values/attrs.xml
app/src/main/res/values/strings.xml
app/src/main/res/values/styles.xml

index 9f20b9ba886d31928ff5c11533ef6d8536fd6daf..e167cf29707abfad4f5519d099b7cb004f8288fa 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/communication/ic_import_export_black_24dp.xml" />
+                                      <entry key="url" value="jar:file:/home/soren/Android/android-studio/plugins/android/lib/android.jar!/images/material_design_icons/content/ic_sort_black_24dp.xml" />
                                     </map>
                                   </option>
                                 </PersistentState>
                         </option>
                         <option name="values">
                           <map>
+                            <entry key="assetSourceType" value="FILE" />
                             <entry key="autoMirrored" value="true" />
-                            <entry key="outputName" value="import_export" />
-                            <entry key="sourceFile" value="$USER_HOME$/ownCloud/Android/Privacy Browser/Icons/Icons/bookmarks_light.svg" />
+                            <entry key="outputName" value="sort_selected_light" />
+                            <entry key="sourceFile" value="$USER_HOME$/ownCloud/Android/Privacy Browser/Icons/Icons/sort_selected_light.svg" />
                           </map>
                         </option>
                       </PersistentState>
index dcdc9b09d8ee691b09e76b14f15fd0cc1e63d1e2..d239bb7dce6adaaf52168b0284a13f9361521ffe 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-  Copyright © 2016-2018 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2016-2019 Soren Stoutner <soren@stoutner.com>.
 
   Translation 2016 Aaron Gerlach <aaron@gerlach.com>.  Copyright assigned to Soren Stoutner <soren@stoutner.com>.
 
@@ -27,7 +27,7 @@
 
     <body>
         <h3>Copyright</h3>
-        <p>Privacy Browser ist copyright © 2015-2018 von <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
+        <p>Privacy Browser ist copyright © 2015-2019 von <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
 
         <h3>Lizenz</h3>
         <p>Privacy Browser ist veröffentlicht unter der <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+ Lizenz</a>. The full text of the license is below.
@@ -73,6 +73,9 @@
         <p><img class="left" src="../shared_images/night_mode_dark.png"> is derived from <code>compare</code>, which is part of the <a href="https://material.io/icons/">Android Material icon set</a>
             and is released under the <a href ="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>. Modifications copyright © 2017 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
             The resulting image is released under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+ license</a>.</p>
+        <p><img class="left" src="../shared_images/sort_selected_light.png"> is derived from <code>sort</code>, which is part of the <a href="https://material.io/icons/">Android Material icon set</a>
+            and is released under the <a href ="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>. Modifications copyright © 2019 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
+            The resulting image is released under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+ license</a>.</p>
         <p><img class="left" src="../shared_images/orbot_dark.png"> orbot is a modified version of
             <a href="https://gitweb.torproject.org/orbot.git/tree/app/src/main/res/drawable-xxxhdpi/ic_stat_tor.png">the status icon from the Orbot project</a>,
             which is copyright 2009-2010 Nathan Freitas, The Guardian Project. It is released under the <a href="https://gitweb.torproject.org/orbot.git/tree/LICENSE">3-clause BSD license</a>.
         <p><img class="icon" src="../shared_images/select_all_dark.png"> select_all.</p>
         <p><img class="icon" src="../shared_images/settings_dark.png"> settings.</p>
         <p><img class="icon" src="../shared_images/smartphone_dark.png"> smartphone.</p>
+        <p><img class="icon" src="../shared_images/sort_dark.png"> sort.</p>
         <p><img class="icon" src="../shared_images/style_dark.png"> style.</p>
         <p><img class="icon" src="../shared_images/subtitles_dark.png"> subtitles.</p>
         <p><img class="icon" src="../shared_images/text_fields_dark.png"> text_fields.</p>
index 63d9c7acd9fa297b1e9661951f31f005b85aa617..b224f444a0e41b729b977fe23dc308e1b4c750b5 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-  Copyright © 2016-2018 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2016-2019 Soren Stoutner <soren@stoutner.com>.
 
   Translation 2016 Aaron Gerlach <aaron@gerlach.com>.  Copyright assigned to Soren Stoutner <soren@stoutner.com>.
 
@@ -26,7 +26,7 @@
 
     <body>
         <h3>Copyright</h3>
-        <p>Privacy Browser ist copyright © 2015-2018 von <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
+        <p>Privacy Browser ist copyright © 2015-2019 von <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
 
         <h3>Lizenz</h3>
         <p>Privacy Browser ist veröffentlicht unter der <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+ Lizenz</a>. The full text of the license is below.
@@ -73,6 +73,9 @@
         <p><img class="left" src="../shared_images/night_mode_light.png"> is derived from <code>compare</code>, which is part of the <a href="https://material.io/icons/">Android Material icon set</a>
             and is released under the <a href ="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>. Modifications copyright © 2017 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
             The resulting image is released under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+ license</a>.</p>
+        <p><img class="left" src="../shared_images/sort_selected_light.png"> is derived from <code>sort</code>, which is part of the <a href="https://material.io/icons/">Android Material icon set</a>
+            and is released under the <a href ="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>. Modifications copyright © 2019 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
+            The resulting image is released under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+ license</a>.</p>
         <p><img class="left" src="../shared_images/orbot_light.png"> orbot is a modified version of
             <a href="https://gitweb.torproject.org/orbot.git/tree/app/src/main/res/drawable-xxxhdpi/ic_stat_tor.png">the status icon from the Orbot project</a>,
             which is copyright 2009-2010 Nathan Freitas, The Guardian Project. It is released under the <a href="https://gitweb.torproject.org/orbot.git/tree/LICENSE">3-clause BSD license</a>.
         <p><img class="icon" src="../shared_images/select_all_light.png"> select_all.</p>
         <p><img class="icon" src="../shared_images/settings_light.png"> settings.</p>
         <p><img class="icon" src="../shared_images/smartphone_light.png"> smartphone.</p>
+        <p><img class="icon" src="../shared_images/sort_light.png"> sort.</p>
         <p><img class="icon" src="../shared_images/style_light.png"> style.</p>
         <p><img class="icon" src="../shared_images/subtitles_light.png"> subtitles.</p>
         <p><img class="icon" src="../shared_images/text_fields_light.png"> text_fields.</p>
index a9e0d42aa6d73124fa6bbe3f9d8798a04c2da63e..97bf1fb1756062f69257ca91c056b47c67989cf2 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>.
 
@@ -25,7 +25,7 @@
 
     <body>
         <h3>Copyright</h3>
-        <p>Privacy Browser copyright © 2015-2018 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
+        <p>Privacy Browser copyright © 2015-2019 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
 
         <h3>License</h3>
         <p>Privacy Browser is released under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+ license</a>. The full text of the license is below.
@@ -71,6 +71,9 @@
         <p><img class="left" src="../shared_images/night_mode_dark.png"> is derived from <code>compare</code>, which is part of the <a href="https://material.io/icons/">Android Material icon set</a>
             and is released under the <a href ="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>. Modifications copyright © 2017 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
             The resulting image is released under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+ license</a>.</p>
+        <p><img class="left" src="../shared_images/sort_selected_dark.png"> is derived from <code>sort</code>, which is part of the <a href="https://material.io/icons/">Android Material icon set</a>
+            and is released under the <a href ="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>. Modifications copyright © 2019 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
+            The resulting image is released under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+ license</a>.</p>
         <p><img class="left" src="../shared_images/orbot_dark.png"> orbot is a modified version of
             <a href="https://gitweb.torproject.org/orbot.git/tree/app/src/main/res/drawable-xxxhdpi/ic_stat_tor.png">the status icon from the Orbot project</a>,
             which is copyright 2009-2010 Nathan Freitas, The Guardian Project. It is released under the <a href="https://gitweb.torproject.org/orbot.git/tree/LICENSE">3-clause BSD license</a>.
         <p><img class="icon" src="../shared_images/select_all_dark.png"> select_all.</p>
         <p><img class="icon" src="../shared_images/settings_dark.png"> settings.</p>
         <p><img class="icon" src="../shared_images/smartphone_dark.png"> smartphone.</p>
+        <p><img class="icon" src="../shared_images/sort_dark.png"> sort.</p>
         <p><img class="icon" src="../shared_images/style_dark.png"> style.</p>
         <p><img class="icon" src="../shared_images/subtitles_dark.png"> subtitles.</p>
         <p><img class="icon" src="../shared_images/text_fields_dark.png"> text_fields.</p>
index e7d5a258a741d703dd237ea149ace5f15aa23f9e..ecb7d54a95893a0f7316cea065f56ba77b49cb7c 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>.
 
@@ -25,7 +25,7 @@
 
     <body>
         <h3>Copyright</h3>
-        <p>Privacy Browser copyright © 2015-2018 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
+        <p>Privacy Browser copyright © 2015-2019 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
 
         <h3>License</h3>
         <p>Privacy Browser is released under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+ license</a>. The full text of the license is below.
@@ -72,6 +72,9 @@
         <p><img class="left" src="../shared_images/night_mode_light.png"> is derived from <code>compare</code>, which is part of the <a href="https://material.io/icons/">Android Material icon set</a>
             and is released under the <a href ="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>. Modifications copyright © 2017 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
             The resulting image is released under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+ license</a>.</p>
+        <p><img class="left" src="../shared_images/sort_selected_light.png"> is derived from <code>sort</code>, which is part of the <a href="https://material.io/icons/">Android Material icon set</a>
+            and is released under the <a href ="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>. Modifications copyright © 2019 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
+            The resulting image is released under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+ license</a>.</p>
         <p><img class="left" src="../shared_images/orbot_light.png"> orbot is a modified version of
             <a href="https://gitweb.torproject.org/orbot.git/tree/app/src/main/res/drawable-xxxhdpi/ic_stat_tor.png">the status icon from the Orbot project</a>,
             which is copyright 2009-2010 Nathan Freitas, The Guardian Project. It is released under the <a href="https://gitweb.torproject.org/orbot.git/tree/LICENSE">3-clause BSD license</a>.
         <p><img class="icon" src="../shared_images/select_all_light.png"> select_all.</p>
         <p><img class="icon" src="../shared_images/settings_light.png"> settings.</p>
         <p><img class="icon" src="../shared_images/smartphone_light.png"> smartphone.</p>
+        <p><img class="icon" src="../shared_images/sort_light.png"> sort.</p>
         <p><img class="icon" src="../shared_images/style_light.png"> style.</p>
         <p><img class="icon" src="../shared_images/subtitles_light.png"> subtitles.</p>
         <p><img class="icon" src="../shared_images/text_fields_light.png"> text_fields.</p>
index 1b75465ee72ad545a3cf6b52ee79a2051c7cd670..5046b13fe019bc193b4f2a546d196842dab50509 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-  Copyright © 2016-2018 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2016-2019 Soren Stoutner <soren@stoutner.com>.
 
   Translation 2017-2018 Jose A. León.  Copyright assigned to Soren Stoutner <soren@stoutner.com>.
 
@@ -27,7 +27,7 @@
 
     <body>
         <h3>Derechos de autor</h3>
-        <p>Navegador Privado tiene derechos de autor © 2015-2018 por <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
+        <p>Navegador Privado tiene derechos de autor © 2015-2019 por <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
 
         <h3>Licencia</h3>
         <p>Navegador Privado está liberado bajo la licencia <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+</a>.
@@ -74,6 +74,9 @@
         <p><img class="left" src="../shared_images/night_mode_dark.png"> deriva de <code>compare</code>, que es parte del <a href="https://material.io/icons/">conjunto de iconos Android Material</a>
             y es liberado bajo la <a href ="https://www.apache.org/licenses/LICENSE-2.0">Licencia Apache 2.0</a>. Copyright de modificaciones © 2017 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
             La imagen resultante se libera bajo la <a href="https://www.gnu.org/licenses/gpl-3.0.html">licencia GPLv3+</a>.</p>
+        <p><img class="left" src="../shared_images/sort_selected_dark.png"> deriva de <code>sort</code>, que es parte del <a href="https://material.io/icons/">conjunto de iconos Android Material</a>
+            y es liberado bajo la <a href ="https://www.apache.org/licenses/LICENSE-2.0">Licencia Apache 2.0</a>. Copyright de modificaciones © 2019 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
+            La imagen resultante se libera bajo la <a href="https://www.gnu.org/licenses/gpl-3.0.html">licencia GPLv3+</a>.</p>
         <p><img class="left" src="../shared_images/orbot_dark.png"> orbot es una versión modificada del
             <a href="https://gitweb.torproject.org/orbot.git/tree/app/src/main/res/drawable-xxxhdpi/ic_stat_tor.png">icono de estado del proyecto Orbot</a>,
             que tiene copyright 2009-2010 por Nathan Freitas, The Guardian Project.
         <p><img class="icon" src="../shared_images/select_all_dark.png"> select_all.</p>
         <p><img class="icon" src="../shared_images/settings_dark.png"> settings.</p>
         <p><img class="icon" src="../shared_images/smartphone_dark.png"> smartphone.</p>
+        <p><img class="icon" src="../shared_images/sort_dark.png"> sort.</p>
         <p><img class="icon" src="../shared_images/style_dark.png"> style.</p>
         <p><img class="icon" src="../shared_images/subtitles_dark.png"> subtitles.</p>
         <p><img class="icon" src="../shared_images/text_fields_dark.png"> text_fields.</p>
index e59f19b4d20df65d0d1fffb52c1ca4b83b298d02..a1607e69bc460c09ac6c7e16753eb0c8ee644aa0 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-  Copyright © 2016-2018 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2016-2019 Soren Stoutner <soren@stoutner.com>.
 
   Translation 2017-2018 Jose A. León.  Copyright assigned to Soren Stoutner <soren@stoutner.com>.
 
@@ -27,7 +27,7 @@
 
     <body>
         <h3>Derechos de autor</h3>
-        <p>Navegador Privado tiene derechos de autor © 2015-2018 por <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
+        <p>Navegador Privado tiene derechos de autor © 2015-2019 por <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
 
         <h3>Licencia</h3>
         <p>Navegador Privado está liberado bajo la licencia <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+</a>.
@@ -74,6 +74,9 @@
         <p><img class="left" src="../shared_images/night_mode_light.png"> deriva de <code>compare</code>, que es parte del <a href="https://material.io/icons/">conjunto de iconos Android Material</a>
             y es liberado bajo la <a href ="https://www.apache.org/licenses/LICENSE-2.0">Licencia Apache 2.0</a>. Copyright de modificaciones © 2017 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
             La imagen resultante se libera bajo la <a href="https://www.gnu.org/licenses/gpl-3.0.html">licencia GPLv3+</a>.</p>
+        <p><img class="left" src="../shared_images/sort_selected_light.png"> deriva de <code>sort</code>, que es parte del <a href="https://material.io/icons/">conjunto de iconos Android Material</a>
+            y es liberado bajo la <a href ="https://www.apache.org/licenses/LICENSE-2.0">Licencia Apache 2.0</a>. Copyright de modificaciones © 2019 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
+            La imagen resultante se libera bajo la <a href="https://www.gnu.org/licenses/gpl-3.0.html">licencia GPLv3+</a>.</p>
         <p><img class="left" src="../shared_images/orbot_light.png"> orbot es una versión modificada del
             <a href="https://gitweb.torproject.org/orbot.git/tree/app/src/main/res/drawable-xxxhdpi/ic_stat_tor.png">icono de estado del proyecto Orbot</a>,
             que tiene copyright 2009-2010 por Nathan Freitas, The Guardian Project.
         <p><img class="icon" src="../shared_images/select_all_light.png"> select_all.</p>
         <p><img class="icon" src="../shared_images/settings_light.png"> settings.</p>
         <p><img class="icon" src="../shared_images/smartphone_light.png"> smartphone.</p>
+        <p><img class="icon" src="../shared_images/sort_light.png"> sort.</p>
         <p><img class="icon" src="../shared_images/style_light.png"> style.</p>
         <p><img class="icon" src="../shared_images/subtitles_light.png"> subtitles.</p>
         <p><img class="icon" src="../shared_images/text_fields_light.png"> text_fields.</p>
index 349622fcaae219968c69dcad9ea6d64a0599c11f..878dc7fec5113c7c0f5b6f40ae87c852d7bdce80 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-  Copyright © 2017-2018 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2017-2019 Soren Stoutner <soren@stoutner.com>.
 
   Translation 2017-2018 Francesco Buratti.  Copyright assigned to Soren Stoutner <soren@stoutner.com>.
 
@@ -25,7 +25,7 @@
 
     <body>
         <h3>Copyright</h3>
-        <p>Privacy Browser copyright © 2015-2018: <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
+        <p>Privacy Browser copyright © 2015-2019: <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
 
         <h3>Licenza</h3>
         <p>Privacy Browser è rilasciato con <a href="https://www.gnu.org/licenses/gpl-3.0.html">Licenza GPLv3+ </a>.
@@ -77,6 +77,9 @@
         <p><img class="left" src="../shared_images/night_mode_dark.png"> è stata derivata da <code>compare</code>,
             che fa parte dell'<a href="https://material.io/icons/">Android Material icon set</a> ed è stata rilasciata sotto <a href="https://www.apache.org/licenses/LICENSE-2.0">Licenza Apache 2.0</a>.
             Copyright delle modifiche © 2017 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
+        <p><img class="left" src="../shared_images/sort_selected_dark.png"> è stata derivata da <code>sort</code>,
+            che fa parte dell'<a href="https://material.io/icons/">Android Material icon set</a> ed è stata rilasciata sotto <a href="https://www.apache.org/licenses/LICENSE-2.0">Licenza Apache 2.0</a>.
+            Copyright delle modifiche © 2019 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
             L'immagine risultante è rilasciata sotto <a href="https://www.gnu.org/licenses/gpl-3.0.html">Licenza GPLv3+</a>.</p>
         <p><img class="left" src="../shared_images/orbot_dark.png"> orbot è una versione modificata della
             <a href="https://gitweb.torproject.org/orbot.git/tree/app/src/main/res/drawable-xxxhdpi/ic_stat_tor.png">icona di stato del progetto Orbot</a>,
         <p><img class="icon" src="../shared_images/select_all_dark.png"> select_all.</p>
         <p><img class="icon" src="../shared_images/settings_dark.png"> settings.</p>
         <p><img class="icon" src="../shared_images/smartphone_dark.png"> smartphone.</p>
+        <p><img class="icon" src="../shared_images/sort_dark.png"> sort.</p>
         <p><img class="icon" src="../shared_images/style_dark.png"> style.</p>
         <p><img class="icon" src="../shared_images/subtitles_dark.png"> subtitles.</p>
         <p><img class="icon" src="../shared_images/text_fields_dark.png"> text_fields.</p>
index 94b949be91ebdfeacba8d61515cbf11fa1254ed6..a1bccd7377e52db2cadb255a75f9eece97fd05db 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-  Copyright © 2017-2018 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2017-2019 Soren Stoutner <soren@stoutner.com>.
 
   Translation 2017-2018 Francesco Buratti.  Copyright assigned to Soren Stoutner <soren@stoutner.com>.
 
@@ -25,7 +25,7 @@
 
     <body>
         <h3>Copyright</h3>
-        <p>Privacy Browser copyright © 2015-2018: <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
+        <p>Privacy Browser copyright © 2015-2019: <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
 
         <h3>Licenza</h3>
         <p>Privacy Browser è rilasciato con <a href="https://www.gnu.org/licenses/gpl-3.0.html">Licenza GPLv3+ </a>.
             che fa parte dell'<a href="https://material.io/icons/">Android Material icon set</a> ed è stata rilasciata sotto <a href="https://www.apache.org/licenses/LICENSE-2.0">Licenza Apache 2.0</a>.
             Copyright delle modifiche © 2017 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
             L'immagine risultante è rilasciata sotto <a href="https://www.gnu.org/licenses/gpl-3.0.html">Licenza GPLv3+</a>.</p>
+        <p><img class="left" src="../shared_images/sort_selected_light.png"> è stata derivata da <code>sort</code>,
+            che fa parte dell'<a href="https://material.io/icons/">Android Material icon set</a> ed è stata rilasciata sotto <a href="https://www.apache.org/licenses/LICENSE-2.0">Licenza Apache 2.0</a>.
+            Copyright delle modifiche © 2019 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
+            L'immagine risultante è rilasciata sotto <a href="https://www.gnu.org/licenses/gpl-3.0.html">Licenza GPLv3+</a>.</p>
         <p><img class="left" src="../shared_images/orbot_light.png"> orbot è una versione modificata della
             <a href="https://gitweb.torproject.org/orbot.git/tree/app/src/main/res/drawable-xxxhdpi/ic_stat_tor.png">icona di stato del progetto Orbot</a>,
             il cui copyright è 2009-2010 Nathan Freitas, The Guardian Project.
         <p><img class="icon" src="../shared_images/select_all_light.png"> select_all.</p>
         <p><img class="icon" src="../shared_images/settings_light.png"> settings.</p>
         <p><img class="icon" src="../shared_images/smartphone_light.png"> smartphone.</p>
+        <p><img class="icon" src="../shared_images/sort_light.png"> sort.</p>
         <p><img class="icon" src="../shared_images/style_light.png"> style.</p>
         <p><img class="icon" src="../shared_images/subtitles_light.png"> subtitles.</p>
         <p><img class="icon" src="../shared_images/text_fields_light.png"> text_fields.</p>
index 7d1f59b4c21f82383398e2ceb94e5bd3c4569e5c..cd6badf1df22ca10826e7ddc68d285fcedf23949 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>.
 
@@ -25,7 +25,7 @@
 
     <body>
         <h3>Авторские права</h3>
-        <p>Авторские права Privacy Browser © 2015-2018 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
+        <p>Авторские права Privacy Browser © 2015-2019 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
 
         <h3>Лицензия</h3>
         <p>Privacy Browser выпущен под <a href="https://www.gnu.org/licenses/gpl-3.0.html">лицензией GPLv3+</a>. Полный текст лицензии приведен ниже.
             и выпущены под <a href ="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>.
             Модификации авторских прав © 2017 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
             Полученные изображения выпущены под <a href="https://www.gnu.org/licenses/gpl-3.0.html">лицензией GPLv3+</a>.</p>
+        <p><img class="left" src="../shared_images/sort_selected_dark.png"> являются производными от <code>sort</code>,
+            которые являются частью <a href="https://material.io/icons/">Android Material icon set</a> и выпущены под <a href ="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>.
+            Модификации авторских прав © 2019 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
+            Полученные изображения выпущены под <a href="https://www.gnu.org/licenses/gpl-3.0.html">лицензией GPLv3+</a>.</p>
         <p><img class="left" src="../shared_images/orbot_dark.png"> orbot - это модифицированная версия
             <a href="https://gitweb.torproject.org/orbot.git/tree/app/src/main/res/drawable-xxxhdpi/ic_stat_tor.png">значок статуса из проекта Orbot</a>,
             который защищен авторским правом 2009-2010 Nathan Freitas, The Guardian Project.
         <p><img class="icon" src="../shared_images/select_all_dark.png"> select_all.</p>
         <p><img class="icon" src="../shared_images/settings_dark.png"> settings.</p>
         <p><img class="icon" src="../shared_images/smartphone_dark.png"> smartphone.</p>
+        <p><img class="icon" src="../shared_images/sort_dark.png"> sort.</p>
         <p><img class="icon" src="../shared_images/style_dark.png"> style.</p>
         <p><img class="icon" src="../shared_images/subtitles_dark.png"> subtitles.</p>
         <p><img class="icon" src="../shared_images/text_fields_dark.png"> text_fields.</p>
index 8b2c3f5c9297ba012094c9d630785f315851f5eb..bd012547ca06444628b128b98ae9fcc7aa355cf1 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>.
 
@@ -25,7 +25,7 @@
 
     <body>
         <h3>Авторские права</h3>
-        <p>Авторские права Privacy Browser © 2015-2018 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
+        <p>Авторские права Privacy Browser © 2015-2019 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
 
         <h3>Лицензия</h3>
         <p>Privacy Browser выпущен под <a href="https://www.gnu.org/licenses/gpl-3.0.html">лицензией GPLv3+</a>. Полный текст лицензии приведен ниже.
             которые являются частью <a href="https://material.io/icons/">Android Material icon set</a> и выпущены под <a href ="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>.
             Модификации авторских прав © 2017 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
             Полученные изображения выпущены под <a href="https://www.gnu.org/licenses/gpl-3.0.html">лицензией GPLv3+</a>.</p>
+        <p><img class="left" src="../shared_images/sort_selected_light.png"> являются производными от <code>sort</code>,
+            которые являются частью <a href="https://material.io/icons/">Android Material icon set</a> и выпущены под <a href ="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>.
+            Модификации авторских прав © 2019 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
+            Полученные изображения выпущены под <a href="https://www.gnu.org/licenses/gpl-3.0.html">лицензией GPLv3+</a>.</p>
         <p><img class="left" src="../shared_images/orbot_light.png"> orbot - это модифицированная версия
             <a href="https://gitweb.torproject.org/orbot.git/tree/app/src/main/res/drawable-xxxhdpi/ic_stat_tor.png">значок статуса из проекта Orbot</a>,
             который защищен авторским правом 2009-2010 Nathan Freitas, The Guardian Project.
         <p><img class="icon" src="../shared_images/select_all_light.png"> select_all.</p>
         <p><img class="icon" src="../shared_images/settings_light.png"> settings.</p>
         <p><img class="icon" src="../shared_images/smartphone_light.png"> smartphone.</p>
+        <p><img class="icon" src="../shared_images/sort_light.png"> sort.</p>
         <p><img class="icon" src="../shared_images/style_light.png"> style.</p>
         <p><img class="icon" src="../shared_images/subtitles_light.png"> subtitles.</p>
         <p><img class="icon" src="../shared_images/text_fields_light.png"> text_fields.</p>
diff --git a/app/src/main/assets/shared_images/sort_dark.png b/app/src/main/assets/shared_images/sort_dark.png
new file mode 100644 (file)
index 0000000..123d279
Binary files /dev/null and b/app/src/main/assets/shared_images/sort_dark.png differ
diff --git a/app/src/main/assets/shared_images/sort_light.png b/app/src/main/assets/shared_images/sort_light.png
new file mode 100644 (file)
index 0000000..03066a0
Binary files /dev/null and b/app/src/main/assets/shared_images/sort_light.png differ
diff --git a/app/src/main/assets/shared_images/sort_selected_dark.png b/app/src/main/assets/shared_images/sort_selected_dark.png
new file mode 100644 (file)
index 0000000..668dbf1
Binary files /dev/null and b/app/src/main/assets/shared_images/sort_selected_dark.png differ
diff --git a/app/src/main/assets/shared_images/sort_selected_light.png b/app/src/main/assets/shared_images/sort_selected_light.png
new file mode 100644 (file)
index 0000000..b106320
Binary files /dev/null and b/app/src/main/assets/shared_images/sort_selected_light.png differ
index a9e0d42aa6d73124fa6bbe3f9d8798a04c2da63e..97bf1fb1756062f69257ca91c056b47c67989cf2 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>.
 
@@ -25,7 +25,7 @@
 
     <body>
         <h3>Copyright</h3>
-        <p>Privacy Browser copyright © 2015-2018 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
+        <p>Privacy Browser copyright © 2015-2019 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
 
         <h3>License</h3>
         <p>Privacy Browser is released under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+ license</a>. The full text of the license is below.
@@ -71,6 +71,9 @@
         <p><img class="left" src="../shared_images/night_mode_dark.png"> is derived from <code>compare</code>, which is part of the <a href="https://material.io/icons/">Android Material icon set</a>
             and is released under the <a href ="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>. Modifications copyright © 2017 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
             The resulting image is released under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+ license</a>.</p>
+        <p><img class="left" src="../shared_images/sort_selected_dark.png"> is derived from <code>sort</code>, which is part of the <a href="https://material.io/icons/">Android Material icon set</a>
+            and is released under the <a href ="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>. Modifications copyright © 2019 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
+            The resulting image is released under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+ license</a>.</p>
         <p><img class="left" src="../shared_images/orbot_dark.png"> orbot is a modified version of
             <a href="https://gitweb.torproject.org/orbot.git/tree/app/src/main/res/drawable-xxxhdpi/ic_stat_tor.png">the status icon from the Orbot project</a>,
             which is copyright 2009-2010 Nathan Freitas, The Guardian Project. It is released under the <a href="https://gitweb.torproject.org/orbot.git/tree/LICENSE">3-clause BSD license</a>.
         <p><img class="icon" src="../shared_images/select_all_dark.png"> select_all.</p>
         <p><img class="icon" src="../shared_images/settings_dark.png"> settings.</p>
         <p><img class="icon" src="../shared_images/smartphone_dark.png"> smartphone.</p>
+        <p><img class="icon" src="../shared_images/sort_dark.png"> sort.</p>
         <p><img class="icon" src="../shared_images/style_dark.png"> style.</p>
         <p><img class="icon" src="../shared_images/subtitles_dark.png"> subtitles.</p>
         <p><img class="icon" src="../shared_images/text_fields_dark.png"> text_fields.</p>
index e7d5a258a741d703dd237ea149ace5f15aa23f9e..ecb7d54a95893a0f7316cea065f56ba77b49cb7c 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>.
 
@@ -25,7 +25,7 @@
 
     <body>
         <h3>Copyright</h3>
-        <p>Privacy Browser copyright © 2015-2018 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
+        <p>Privacy Browser copyright © 2015-2019 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.</p>
 
         <h3>License</h3>
         <p>Privacy Browser is released under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+ license</a>. The full text of the license is below.
@@ -72,6 +72,9 @@
         <p><img class="left" src="../shared_images/night_mode_light.png"> is derived from <code>compare</code>, which is part of the <a href="https://material.io/icons/">Android Material icon set</a>
             and is released under the <a href ="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>. Modifications copyright © 2017 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
             The resulting image is released under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+ license</a>.</p>
+        <p><img class="left" src="../shared_images/sort_selected_light.png"> is derived from <code>sort</code>, which is part of the <a href="https://material.io/icons/">Android Material icon set</a>
+            and is released under the <a href ="https://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>. Modifications copyright © 2019 <a href="mailto:soren@stoutner.com">Soren Stoutner</a>.
+            The resulting image is released under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+ license</a>.</p>
         <p><img class="left" src="../shared_images/orbot_light.png"> orbot is a modified version of
             <a href="https://gitweb.torproject.org/orbot.git/tree/app/src/main/res/drawable-xxxhdpi/ic_stat_tor.png">the status icon from the Orbot project</a>,
             which is copyright 2009-2010 Nathan Freitas, The Guardian Project. It is released under the <a href="https://gitweb.torproject.org/orbot.git/tree/LICENSE">3-clause BSD license</a>.
         <p><img class="icon" src="../shared_images/select_all_light.png"> select_all.</p>
         <p><img class="icon" src="../shared_images/settings_light.png"> settings.</p>
         <p><img class="icon" src="../shared_images/smartphone_light.png"> smartphone.</p>
+        <p><img class="icon" src="../shared_images/sort_light.png"> sort.</p>
         <p><img class="icon" src="../shared_images/style_light.png"> style.</p>
         <p><img class="icon" src="../shared_images/subtitles_light.png"> subtitles.</p>
         <p><img class="icon" src="../shared_images/text_fields_light.png"> text_fields.</p>
index e55b6711f0b757d4ee78a497ae313f29991160d0..4d752d126f7af645482e53f250b4d47de093f52e 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>.
  *
@@ -631,7 +631,7 @@ public class BookmarksActivity extends AppCompatActivity implements CreateBookma
 
     @Override
     public boolean onOptionsItemSelected(MenuItem menuItem) {
-        // Get the ID of the `MenuItem` that was selected.
+        // Get the ID of the menu item that was selected.
         int menuItemId = menuItem.getItemId();
 
         switch (menuItemId) {
index d8a58972990dfcfa6169353f2942b56f10c3eeaf..1f011f72618dc53dfb8ac55a0ee70de24e8ccab3 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>.
  *
@@ -29,6 +29,8 @@ import android.graphics.Typeface;
 import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
 import android.os.Bundle;
+import android.support.design.widget.Snackbar;
+import android.support.v4.app.NavUtils;
 import android.support.v4.content.ContextCompat;
 import android.support.v4.widget.CursorAdapter;
 import android.support.v4.widget.ResourceCursorAdapter;
@@ -37,6 +39,8 @@ import android.support.v7.app.AppCompatActivity;
 // `AppCompatDialogFragment` is required instead of `DialogFragment` or an error is produced on API <=22.
 import android.support.v7.app.AppCompatDialogFragment;
 import android.support.v7.widget.Toolbar;
+import android.view.Menu;
+import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.WindowManager;
@@ -66,18 +70,21 @@ public class BookmarksDatabaseViewActivity extends AppCompatActivity implements
     // `bookmarksCursor` is used in `onCreate()`, `updateBookmarksListView()`, `onSaveBookmark()`, `onSaveBookmarkFolder()`, and `onDestroy()`.
     private Cursor bookmarksCursor;
 
-    // `bookmarksCursorAdapter` is used in `onCreate()`, `onSaveBookmark()`, `onSaveBookmarkFolder()`.
+    // `bookmarksCursorAdapter` is used in `onCreate()` and `updateBookmarksListView()`.
     private CursorAdapter bookmarksCursorAdapter;
 
     // `oldFolderNameString` is used in `onCreate()` and `onSaveBookmarkFolder()`.
     private String oldFolderNameString;
 
-    // `currentFolderDatabaseId` is used in `onCreate()`, `onSaveBookmark()`, and `onSaveBookmarkFolder()`.
+    // `currentFolderDatabaseId` is used in `onCreate()`, `updateBookmarksListView()`, `onSaveBookmark()`, and `onSaveBookmarkFolder()`.
     private int currentFolderDatabaseId;
 
     // `currentFolder` is used in `onCreate()`, `onSaveBookmark()`, and `onSaveBookmarkFolder()`.
     private String currentFolderName;
 
+    // `sortByDisplayOrder` is used in `onCreate()`, `onOptionsItemSelected()`, and `updateBookmarksListView()`.
+    private boolean sortByDisplayOrder;
+
     @Override
     public void onCreate(Bundle savedInstanceState) {
         // Disable screenshots if not allowed.
@@ -99,11 +106,11 @@ public class BookmarksDatabaseViewActivity extends AppCompatActivity implements
         setContentView(R.layout.bookmarks_databaseview_coordinatorlayout);
 
         // The `SupportActionBar` from `android.support.v7.app.ActionBar` must be used until the minimum API is >= 21.
-        final Toolbar bookmarksDatabaseViewAppBar = findViewById(R.id.bookmarks_databaseview_toolbar);
+        Toolbar bookmarksDatabaseViewAppBar = findViewById(R.id.bookmarks_databaseview_toolbar);
         setSupportActionBar(bookmarksDatabaseViewAppBar);
 
         // Get a handle for the `AppBar`.
-        final ActionBar appBar = getSupportActionBar();
+        ActionBar appBar = getSupportActionBar();
 
         // Remove the incorrect warning in Android Studio that `appBar` might be null.
         assert appBar != null;
@@ -150,41 +157,17 @@ public class BookmarksDatabaseViewActivity extends AppCompatActivity implements
         folderSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
             @Override
             public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
-                // Convert the database ID to an `int`.
-                int databaseId = (int) id;
-
                 // Store the current folder database ID.
-                currentFolderDatabaseId = databaseId;
-
-                // Populate the bookmarks list view based on the spinner selection.
-                switch (databaseId) {
-                    // Get a cursor with all the folders.
-                    case ALL_FOLDERS_DATABASE_ID:
-                        bookmarksCursor = bookmarksDatabaseHelper.getAllBookmarksCursor();
-                        break;
-
-                    // Get a cursor for the home folder.
-                    case HOME_FOLDER_DATABASE_ID:
-                        bookmarksCursor = bookmarksDatabaseHelper.getAllBookmarksCursor("");
-                        break;
-
-                    // Display the selected folder.
-                    default:
-                        // Get a handle for the selected view.
-                        TextView selectedFolderTextView = view.findViewById(R.id.spinner_item_textview);
+                currentFolderDatabaseId = (int) id;
 
-                        // Extract the name of the selected folder.
-                        String folderName = selectedFolderTextView.getText().toString();
+                // Get a handle for the selected view.
+                TextView selectedFolderTextView = findViewById(R.id.spinner_item_textview);
 
-                        // Get a cursor for the selected folder.
-                        bookmarksCursor = bookmarksDatabaseHelper.getAllBookmarksCursor(folderName);
-
-                        // Store the current folder name.
-                        currentFolderName = folderName;
-                }
+                // Store the current folder name.
+                currentFolderName = selectedFolderTextView.getText().toString();
 
                 // Update the list view.
-                bookmarksCursorAdapter.changeCursor(bookmarksCursor);
+                updateBookmarksListView();
             }
 
             @Override
@@ -305,6 +288,98 @@ public class BookmarksDatabaseViewActivity extends AppCompatActivity implements
         });
     }
 
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        // Inflate the menu.
+        getMenuInflater().inflate(R.menu.bookmarks_databaseview_options_menu, menu);
+
+        // Success.
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem menuItem) {
+        // Get the ID of the menu item that was selected.
+        int menuItemId = menuItem.getItemId();
+
+        switch (menuItemId) {
+            case android.R.id.home:  // The home arrow is identified as `android.R.id.home`, not just `R.id.home`.
+                // Return to `MainWebViewActivity`.
+                NavUtils.navigateUpFromSameTask(this);
+                break;
+
+            case R.id.options_menu_sort:
+                // Update the sort by display order tracker.
+                sortByDisplayOrder = !sortByDisplayOrder;
+
+                // Get a handle for the bookmarks `ListView`.
+                ListView bookmarksListView = findViewById(R.id.bookmarks_databaseview_listview);
+
+                // Update the icon and display a snackbar.
+                if (sortByDisplayOrder) {  // Sort by display order.
+                    // Update the icon according to the theme.
+                    if (MainWebViewActivity.darkTheme) {
+                        menuItem.setIcon(R.drawable.sort_selected_dark);
+                    } else {
+                        menuItem.setIcon(R.drawable.sort_selected_light);
+                    }
+
+                    // Display a Snackbar indicating the current sort type.
+                    Snackbar.make(bookmarksListView, R.string.sorted_by_display_order, Snackbar.LENGTH_SHORT).show();
+                } else {  // Sort by database id.
+                    // Update the icon according to the theme.
+                    if (MainWebViewActivity.darkTheme) {
+                        menuItem.setIcon(R.drawable.sort_dark);
+                    } else {
+                        menuItem.setIcon(R.drawable.sort_light);
+                    }
+
+                    // Display a Snackbar indicating the current sort type.
+                    Snackbar.make(bookmarksListView, R.string.sorted_by_database_id, Snackbar.LENGTH_SHORT).show();
+                }
+
+                // Update the list view.
+                updateBookmarksListView();
+                break;
+        }
+        return true;
+    }
+
+    private void updateBookmarksListView() {
+        // Populate the bookmarks list view based on the spinner selection.
+        switch (currentFolderDatabaseId) {
+            // Get a cursor with all the folders.
+            case ALL_FOLDERS_DATABASE_ID:
+                if (sortByDisplayOrder) {
+                    bookmarksCursor = bookmarksDatabaseHelper.getAllBookmarksCursorByDisplayOrder();
+                } else {
+                    bookmarksCursor = bookmarksDatabaseHelper.getAllBookmarksCursor();
+                }
+                break;
+
+            // Get a cursor for the home folder.
+            case HOME_FOLDER_DATABASE_ID:
+                if (sortByDisplayOrder) {
+                    bookmarksCursor = bookmarksDatabaseHelper.getAllBookmarksCursorByDisplayOrder("");
+                } else {
+                    bookmarksCursor = bookmarksDatabaseHelper.getAllBookmarksCursor("");
+                }
+                break;
+
+            // Display the selected folder.
+            default:
+                // Get a cursor for the selected folder.
+                if (sortByDisplayOrder) {
+                    bookmarksCursor = bookmarksDatabaseHelper.getAllBookmarksCursorByDisplayOrder(currentFolderName);
+                } else {
+                    bookmarksCursor = bookmarksDatabaseHelper.getAllBookmarksCursor(currentFolderName);
+                }
+        }
+
+        // Update the list view.
+        bookmarksCursorAdapter.changeCursor(bookmarksCursor);
+    }
+
     @Override
     public void onSaveBookmark(AppCompatDialogFragment dialogFragment, int selectedBookmarkDatabaseId) {
         // Get handles for the views from dialog fragment.
@@ -343,25 +418,8 @@ public class BookmarksDatabaseViewActivity extends AppCompatActivity implements
             bookmarksDatabaseHelper.updateBookmark(selectedBookmarkDatabaseId, bookmarkNameString, bookmarkUrlString, parentFolderNameString, displayOrderInt, newFavoriteIconByteArray);
         }
 
-        // Update `bookmarksCursor` with the contents of the current folder.
-        switch (currentFolderDatabaseId) {
-            case ALL_FOLDERS_DATABASE_ID:
-                // Get a cursor with all the bookmarks.
-                bookmarksCursor = bookmarksDatabaseHelper.getAllBookmarksCursor();
-                break;
-
-            case HOME_FOLDER_DATABASE_ID:
-                // Get a cursor with all the bookmarks in the home folder.
-                bookmarksCursor = bookmarksDatabaseHelper.getAllBookmarksCursor("");
-                break;
-
-            default:
-                // Get a cursor with all the bookmarks in the current folder.
-                bookmarksCursor = bookmarksDatabaseHelper.getAllBookmarksCursor(currentFolderName);
-        }
-
-        // Update the `ListView`.
-        bookmarksCursorAdapter.changeCursor(bookmarksCursor);
+        // Update the list view.
+        updateBookmarksListView();
     }
 
     @Override
@@ -415,25 +473,8 @@ public class BookmarksDatabaseViewActivity extends AppCompatActivity implements
             bookmarksDatabaseHelper.updateFolder(selectedBookmarkDatabaseId, oldFolderNameString, newFolderNameString, parentFolderNameString, displayOrderInt, newFolderIconByteArray);
         }
 
-        // Update `bookmarksCursor` with the contents of the current folder.
-        switch (currentFolderDatabaseId) {
-            case ALL_FOLDERS_DATABASE_ID:
-                // Get a cursor with all the bookmarks.
-                bookmarksCursor = bookmarksDatabaseHelper.getAllBookmarksCursor();
-                break;
-
-            case HOME_FOLDER_DATABASE_ID:
-                // Get a cursor with all the bookmarks in the home folder.
-                bookmarksCursor = bookmarksDatabaseHelper.getAllBookmarksCursor("");
-                break;
-
-            default:
-                // Get a cursor with all the bookmarks in the current folder.
-                bookmarksCursor = bookmarksDatabaseHelper.getAllBookmarksCursor(currentFolderName);
-        }
-
-        // Update the `ListView`.
-        bookmarksCursorAdapter.changeCursor(bookmarksCursor);
+        // Update the list view.
+        updateBookmarksListView();
     }
 
     @Override
index 83fff5abda6fc75d2cabd607bb513b7f500b5e66..647cdb717f9acdb1886a5970a6354791b4c54adf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2015-2018 Soren Stoutner <soren@stoutner.com>.
+ * Copyright © 2015-2019 Soren Stoutner <soren@stoutner.com>.
  *
  * Download cookie code contributed 2017 Hendrik Knackstedt.  Copyright assigned to Soren Stoutner <soren@stoutner.com>.
  *
index 7eb584b52763b5f0fde25ae4390f443a27de740c..ad97e38c555106fb9c419a1d00dc6b8165b62337 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>.
  *
@@ -166,7 +166,7 @@ public class BookmarksDatabaseHelper extends SQLiteOpenHelper {
         folderName = DatabaseUtils.sqlEscapeString(folderName);
 
         // Prepare the SQL statement to get the `Cursor` for the folder.
-        final String GET_FOLDER = "SELECT * FROM " + BOOKMARKS_TABLE +
+        String GET_FOLDER = "SELECT * FROM " + BOOKMARKS_TABLE +
                 " WHERE " + BOOKMARK_NAME + " = " + folderName +
                 " AND " + IS_FOLDER + " = " + 1;
 
@@ -194,7 +194,7 @@ public class BookmarksDatabaseHelper extends SQLiteOpenHelper {
         folderName = DatabaseUtils.sqlEscapeString(folderName);
 
         // Prepare the SQL statement to get the `Cursor` for the folder.
-        final String GET_FOLDER = "SELECT * FROM " + BOOKMARKS_TABLE +
+        String GET_FOLDER = "SELECT * FROM " + BOOKMARKS_TABLE +
                 " WHERE " + BOOKMARK_NAME + " = " + folderName +
                 " AND " + IS_FOLDER + " = " + 1;
 
@@ -209,7 +209,7 @@ public class BookmarksDatabaseHelper extends SQLiteOpenHelper {
         SQLiteDatabase bookmarksDatabase = this.getReadableDatabase();
 
         // Prepare the SQL statement to get the `Cursor` for the folders.
-        final String GET_FOLDERS_EXCEPT = "SELECT * FROM " + BOOKMARKS_TABLE +
+        String GET_FOLDERS_EXCEPT = "SELECT * FROM " + BOOKMARKS_TABLE +
                 " WHERE " + IS_FOLDER + " = " + 1 +
                 " AND " + BOOKMARK_NAME + " NOT IN (" + exceptFolders +
                 ") ORDER BY " + BOOKMARK_NAME + " ASC";
@@ -228,7 +228,7 @@ public class BookmarksDatabaseHelper extends SQLiteOpenHelper {
         currentFolder = DatabaseUtils.sqlEscapeString(currentFolder);
 
         // Prepare the SQL statement to get the `Cursor` for the subfolders.
-        final String GET_SUBFOLDERS = "SELECT * FROM " + BOOKMARKS_TABLE +
+        String GET_SUBFOLDERS = "SELECT * FROM " + BOOKMARKS_TABLE +
                 " WHERE " + PARENT_FOLDER + " = " + currentFolder +
                 " AND " + IS_FOLDER + " = " + 1;
 
@@ -246,7 +246,7 @@ public class BookmarksDatabaseHelper extends SQLiteOpenHelper {
         currentFolder = DatabaseUtils.sqlEscapeString(currentFolder);
 
         // Prepare the SQL statement to get the parent folder.
-        final String GET_PARENT_FOLDER = "SELECT * FROM " + BOOKMARKS_TABLE +
+        String GET_PARENT_FOLDER = "SELECT * FROM " + BOOKMARKS_TABLE +
                 " WHERE " + IS_FOLDER + " = " + 1 +
                 " AND " + BOOKMARK_NAME + " = " + currentFolder;
 
@@ -269,7 +269,7 @@ public class BookmarksDatabaseHelper extends SQLiteOpenHelper {
         SQLiteDatabase bookmarksDatabase = this.getReadableDatabase();
 
         // Prepare the SQL statement to get the `Cursor` for all the folders.
-        final String GET_ALL_FOLDERS = "SELECT * FROM " + BOOKMARKS_TABLE +
+        String GET_ALL_FOLDERS = "SELECT * FROM " + BOOKMARKS_TABLE +
                 " WHERE " + IS_FOLDER + " = " + 1 +
                 " ORDER BY " + BOOKMARK_NAME + " ASC";
 
@@ -278,15 +278,15 @@ public class BookmarksDatabaseHelper extends SQLiteOpenHelper {
         return bookmarksDatabase.rawQuery(GET_ALL_FOLDERS, null);
     }
 
-    // Get a `Cursor` for all bookmarks and folders.
+    // Get a cursor for all bookmarks and folders.
     public Cursor getAllBookmarksCursor() {
         // Get a readable database handle.
         SQLiteDatabase bookmarksDatabase = this.getReadableDatabase();
 
-        // Get everything in in the bookmarks table.
-        final String GET_ALL_BOOKMARKS = "SELECT * FROM " + BOOKMARKS_TABLE;
+        // Get everything in the bookmarks table.
+        String GET_ALL_BOOKMARKS = "SELECT * FROM " + BOOKMARKS_TABLE;
 
-        // Return the results as a Cursor.  The second argument is `null` because there are no selectionArgs.  The Cursor cannot be closed because it is used in the parent activity.
+        // Return the result as a Cursor.  The Cursor cannot be closed because it is used in the parent activity.
         return bookmarksDatabase.rawQuery(GET_ALL_BOOKMARKS, null);
     }
 
@@ -295,18 +295,31 @@ public class BookmarksDatabaseHelper extends SQLiteOpenHelper {
         // Get a readable database handle.
         SQLiteDatabase bookmarksDatabase = this.getReadableDatabase();
 
-        // SQL escape `folderName`.
+        // SQL escape the folder name.
         folderName = DatabaseUtils.sqlEscapeString(folderName);
 
         // Get everything in the bookmarks table with `folderName` as the `PARENT_FOLDER`.
-        final String GET_ALL_BOOKMARKS = "SELECT * FROM " + BOOKMARKS_TABLE +
+        String GET_ALL_BOOKMARKS = "SELECT * FROM " + BOOKMARKS_TABLE +
                 " WHERE " + PARENT_FOLDER + " = " + folderName;
 
-        // Return the results as a `Cursor`.  The second argument is `null` because there are no `selectionArgs`.  The Cursor cannot be closed because it is used in the parent activity.
+        // Return the result as a cursor.  The cursor cannot be closed because it is used in the parent activity.
+        return bookmarksDatabase.rawQuery(GET_ALL_BOOKMARKS, null);
+    }
+
+    // Get a cursor for all bookmarks and folders ordered by display order.
+    public Cursor getAllBookmarksCursorByDisplayOrder() {
+        // Get a readable database handle.
+        SQLiteDatabase bookmarksDatabase = this.getReadableDatabase();
+
+        // Get everything in the bookmarks table ordered by display order.
+        String GET_ALL_BOOKMARKS = "SELECT * FROM " + BOOKMARKS_TABLE +
+                " ORDER BY " + DISPLAY_ORDER + " ASC";
+
+        // Return the result as a cursor.  The cursor cannot be closed because it is used in the parent activity.
         return bookmarksDatabase.rawQuery(GET_ALL_BOOKMARKS, null);
     }
 
-    // Get a `Cursor` for all bookmarks and folders in the specified folder ordered by display order.
+    // Get a cursor for all bookmarks and folders in the specified folder ordered by display order.
     public Cursor getAllBookmarksCursorByDisplayOrder(String folderName) {
         // Get a readable database handle.
         SQLiteDatabase bookmarksDatabase = this.getReadableDatabase();
@@ -314,12 +327,12 @@ public class BookmarksDatabaseHelper extends SQLiteOpenHelper {
         // SQL escape `folderName`.
         folderName = DatabaseUtils.sqlEscapeString(folderName);
 
-        // Get everything in the `BOOKMARKS_TABLE` with `folderName` as the `PARENT_FOLDER`.
-        final String GET_ALL_BOOKMARKS = "SELECT * FROM " + BOOKMARKS_TABLE +
+        // Get everything in the bookmarks table with `folderName` as the `PARENT_FOLDER`.
+        String GET_ALL_BOOKMARKS = "SELECT * FROM " + BOOKMARKS_TABLE +
                 " WHERE " + PARENT_FOLDER + " = " + folderName +
                 " ORDER BY " + DISPLAY_ORDER + " ASC";
 
-        // Return the results as a `Cursor`.  The second argument is `null` because there are no `selectionArgs`.  The Cursor cannot be closed because it is used in the parent activity.
+        // Return the result as a cursor.  The cursor cannot be closed because it is used in the parent activity.
         return bookmarksDatabase.rawQuery(GET_ALL_BOOKMARKS, null);
     }
 
@@ -346,7 +359,7 @@ public class BookmarksDatabaseHelper extends SQLiteOpenHelper {
         folderName = DatabaseUtils.sqlEscapeString(folderName);
 
         // Prepare the SQL statement to select all items except those with the specified IDs.
-        final String GET_All_BOOKMARKS_EXCEPT_SPECIFIED = "SELECT * FROM " + BOOKMARKS_TABLE +
+        String GET_All_BOOKMARKS_EXCEPT_SPECIFIED = "SELECT * FROM " + BOOKMARKS_TABLE +
                 " WHERE " + PARENT_FOLDER + " = " + folderName +
                 " AND " + _ID + " NOT IN (" + doNotGetIdsStringBuilder.toString() +
                 ") ORDER BY " + DISPLAY_ORDER + " ASC";
@@ -362,7 +375,7 @@ public class BookmarksDatabaseHelper extends SQLiteOpenHelper {
         SQLiteDatabase bookmarksDatabase = this.getReadableDatabase();
 
         // Prepare the SQL statement to determine if `databaseId` is a folder.
-        final String CHECK_IF_FOLDER = "SELECT * FROM " + BOOKMARKS_TABLE +
+        String CHECK_IF_FOLDER = "SELECT * FROM " + BOOKMARKS_TABLE +
                 " WHERE " + _ID + " = " + databaseId;
 
         // Populate folderCursor.  The second argument is `null` because there are no `selectionArgs`.
@@ -612,7 +625,7 @@ public class BookmarksDatabaseHelper extends SQLiteOpenHelper {
         String newFolderSqlEscaped = DatabaseUtils.sqlEscapeString(newFolder);
 
         // Prepare a SQL query to select all the bookmarks in the new folder.
-        final String NEW_FOLDER = "SELECT * FROM " + BOOKMARKS_TABLE +
+        String NEW_FOLDER = "SELECT * FROM " + BOOKMARKS_TABLE +
                 " WHERE " + PARENT_FOLDER + " = " + newFolderSqlEscaped +
                 " ORDER BY " + DISPLAY_ORDER + " ASC";
 
diff --git a/app/src/main/res/drawable/sort_dark.xml b/app/src/main/res/drawable/sort_dark.xml
new file mode 100644 (file)
index 0000000..a5a6c13
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- `sort_dark.xml` comes from the Android Material icon set, where it is called `sort`.  It is released under the Apache License 2.0. -->
+
+<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:autoMirrored="true"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24.0"
+    android:viewportWidth="24.0"
+    tools:ignore="VectorRaster" >
+
+    <!-- A hard coded color must be used until API >= 21.  Then `@color` can be used. -->
+    <path
+        android:fillColor="#FFE0E0E0"
+        android:pathData="M3,18h6v-2L3,16v2zM3,6v2h18L21,6L3,6zM3,13h12v-2L3,11v2z" />
+</vector>
diff --git a/app/src/main/res/drawable/sort_light.xml b/app/src/main/res/drawable/sort_light.xml
new file mode 100644 (file)
index 0000000..26ad900
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- `sort_light.xml` comes from the Android Material icon set, where it is called `sort`.  It is released under the Apache License 2.0. -->
+
+<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:autoMirrored="true"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24.0"
+    android:viewportWidth="24.0"
+    tools:ignore="VectorRaster" >
+
+    <!-- A hard coded color must be used until API >= 21.  Then `@color` can be used. -->
+    <path
+        android:fillColor="#FFFFFFFF"
+        android:pathData="M3,18h6v-2L3,16v2zM3,6v2h18L21,6L3,6zM3,13h12v-2L3,11v2z" />
+</vector>
diff --git a/app/src/main/res/drawable/sort_selected_dark.xml b/app/src/main/res/drawable/sort_selected_dark.xml
new file mode 100644 (file)
index 0000000..228510b
--- /dev/null
@@ -0,0 +1,26 @@
+<!-- `sort_selected_dark` is derived from `sort`, which is part of the Android Material icon set and is released under the Apache License 2.0.
+    Modifications copyright © 2019 Soren Stoutner <soren@stoutner.com>.  The resulting image is released under the GPLv3+ license. -->
+
+<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:autoMirrored="true"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24"
+    android:viewportWidth="24"
+    tools:ignore="VectorRaster">
+
+    <!-- A hard coded color must be used until API >= 21.  Then `@color` can be used. -->
+    <path
+        android:fillAlpha="0.11635222"
+        android:fillColor="#000000"
+        android:pathData="M3.1525,0L20.8475,0A3.1525,3.1525 0,0 1,24 3.1525L24,20.8475A3.1525,3.1525 0,0 1,20.8475 24L3.1525,24A3.1525,3.1525 0,0 1,0 20.8475L0,3.1525A3.1525,3.1525 0,0 1,3.1525 0z" />
+
+    <!-- A hard coded color must be used until API >= 21.  Then `@color` can be used. -->
+    <path
+        android:fillAlpha="1"
+        android:fillColor="#E0E0E0"
+        android:pathData="M3,18H9V16H3ZM3,6v2h18v-2zM3,13H15V11H3Z" />
+</vector>
diff --git a/app/src/main/res/drawable/sort_selected_light.xml b/app/src/main/res/drawable/sort_selected_light.xml
new file mode 100644 (file)
index 0000000..f980582
--- /dev/null
@@ -0,0 +1,26 @@
+<!-- `sort_selected_light` is derived from `sort`, which is part of the Android Material icon set and is released under the Apache License 2.0.
+    Modifications copyright © 2019 Soren Stoutner <soren@stoutner.com>.  The resulting image is released under the GPLv3+ license. -->
+
+<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:autoMirrored="true"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportHeight="24"
+    android:viewportWidth="24"
+    tools:ignore="VectorRaster">
+
+    <!-- A hard coded color must be used until API >= 21.  Then `@color` can be used. -->
+    <path
+        android:fillAlpha="0.11635222"
+        android:fillColor="#000000"
+        android:pathData="M3.1525,0L20.8475,0A3.1525,3.1525 0,0 1,24 3.1525L24,20.8475A3.1525,3.1525 0,0 1,20.8475 24L3.1525,24A3.1525,3.1525 0,0 1,0 20.8475L0,3.1525A3.1525,3.1525 0,0 1,3.1525 0z" />
+
+    <!-- A hard coded color must be used until API >= 21.  Then `@color` can be used. -->
+    <path
+        android:fillAlpha="1"
+        android:fillColor="#ffffff"
+        android:pathData="M3,18H9V16H3ZM3,6v2h18v-2zM3,13H15V11H3Z" />
+</vector>
index 9d132c4e7772a79a90d71bede1c2c72fb201c363..3a717ce79321a5c95372714adeb174177b5581fb 100644 (file)
@@ -9,7 +9,7 @@
     android:width="24dp"
     android:viewportWidth="24.0"
     android:viewportHeight="24.0"
-    tools:ignore="VectorRaster">
+    tools:ignore="VectorRaster" >
 
     <!-- A hard coded color must be used until API >= 21.  Then `@color` can be used. -->
     <path
index a9b107984bf91139d4e05ce14b544cbc7bb99c2e..c1409d0deddf79ddf89f9313dc9c09053cea3b84 100644 (file)
@@ -9,7 +9,7 @@
     android:width="24dp"
     android:viewportWidth="24.0"
     android:viewportHeight="24.0"
-    tools:ignore="VectorRaster">
+    tools:ignore="VectorRaster" >
 
     <!-- A hard coded color must be used until API >= 21.  Then `@color` can be used. -->
     <path
diff --git a/app/src/main/res/menu/bookmarks_databaseview_options_menu.xml b/app/src/main/res/menu/bookmarks_databaseview_options_menu.xml
new file mode 100644 (file)
index 0000000..f200580
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 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/>. -->
+
+<menu
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto" >
+
+    <!-- `android:iconTint` can be used once the minimum API >= 26 instead of including a separate drawable for each theme. -->
+    <item
+        android:id="@+id/options_menu_sort"
+        android:title="@string/sort"
+        android:orderInCategory="10"
+        android:icon="?attr/sortIcon"
+        app:showAsAction="always" />
+</menu>
\ No newline at end of file
index acf69eaf287d82bf3788802928182823555e4869..8c26ff923f4b770f30c17669509f36c1515597cd 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  Copyright © 2015-2018 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2015-2019 Soren Stoutner <soren@stoutner.com>.
 
   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
 
index f8b816df9f36ed3eaf1dcbf7df1e36e8988a9cc3..ea8477708a0bafb5c0cd01a6ecdd87c9be259d6e 100644 (file)
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  Copyright © 2016-2018 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2016-2019 Soren Stoutner <soren@stoutner.com>.
 
-  Translation 2017-2018 Jose A. León Becerra.  Copyright assigned to Soren Stoutner <soren@stoutner.com>.
+  Translation 2017-2019 Jose A. León Becerra.  Copyright assigned to Soren Stoutner <soren@stoutner.com>.
 
   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
 
         <string name="display_images">Mostrar imágenes</string>
         <string name="view_source">Ver la fuente</string>
     <string name="share">Compartir</string>
+        <string name="share_url">Compartir URL</string>
+        <string name="open_with_app">Abrir con App</string>
+        <string name="open_with_browser">Abrir con Navegador</string>
     <string name="find_on_page">Buscar en página</string>
     <string name="print">Imprimir</string>
         <string name="privacy_browser_web_page">Página web de Navegador Privado</string>
index 2b14cc018ce2a613bd36705e1e91f9ef6da1c8d9..47313d204c44840d02527deca6021948f33b276f 100644 (file)
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  Copyright © 2017-2018 Soren Stoutner <soren@stoutner.com>.
+  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>.
 
   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
 
         <string name="display_images">Mostra immagini</string>
         <string name="view_source">Visualizza sorgente</string>
     <string name="share">Condividi</string>
+        <string name="share_url">Condividi URL</string>
+        <string name="open_with_app">Apri con App</string>
+        <string name="open_with_browser">Apri con il Browser</string>
     <string name="find_on_page">Cerca nella pagina</string>
     <string name="print">Stampa</string>
         <string name="privacy_browser_web_page">Pagina web di Privacy Browser</string>
index fcc3280d21fd94d6e8c0dd80965487eb600c4a5f..f7aa94d2b5e72823f4a4e132835b0b373f467491 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  Copyright © 2015-2018 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2015-2019 Soren Stoutner <soren@stoutner.com>.
 
   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
 
         <string name="display_images">Показывать изображения</string>
         <string name="view_source">Просмотр исходного кода</string>
     <string name="share">Поделиться</string>
+        <string name="share_url">Поделиться URL</string>
+        <string name="open_with_app">Открыть в приложении</string>
+        <string name="open_with_browser">Открыть в браузере</string>
     <string name="find_on_page">Найти на странице</string>
     <string name="print">Печать</string>
         <string name="privacy_browser_web_page">Privacy Browser веб-страница</string>
index c4da7c6634fccdc0f66ed5e7375c641c014a245c..8075ce6413b1b820afd977da4dd8a9f562ccbc32 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  Copyright © 2015-2018 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2015-2019 Soren Stoutner <soren@stoutner.com>.
 
   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
 
         <string name="display_images">Resimleri Göster</string>
         <string name="view_source">Kaynağı Görüntüle</string>
     <string name="share">Paylaş</string>
+        <string name="share_url">URL Paylaş</string>
+        <string name="open_with_app">Uygulamayla Aç</string>
+        <string name="open_with_browser">Tarayıcıyla Aç</string>
     <string name="find_on_page">Sayfada Bul</string>
     <string name="print">Yazdır</string>
         <string name="privacy_browser_web_page">Privacy Browser Web Sayfası</string>
index 26ea9349da21aa6ca6bef4e4d0dbf8e37a51b7f8..54a16ce0ba609a9b27e3b6e2e311fc1a16d845fe 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  Copyright © 2015-2018 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2015-2019 Soren Stoutner <soren@stoutner.com>.
 
   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
 
@@ -69,6 +69,7 @@
         <item name="selectAllIcon">@drawable/select_all_light</item>
         <item name="editIcon">@drawable/edit_light</item>
         <item name="moveToFolderIcon">@drawable/move_to_folder_light</item>
+        <item name="sortIcon">@drawable/sort_light</item>
         <item name="actionBarPopupTheme">@style/PrivacyBrowserPopupsLight</item>
         <item name="appBarTextTheme">@style/PrivacyBrowserAppBarWhiteText</item>
         <item name="tabLayoutTheme">@style/PrivacyBrowserTabLayoutLight</item>
         <item name="selectAllIcon">@drawable/select_all_dark</item>
         <item name="editIcon">@drawable/edit_dark</item>
         <item name="moveToFolderIcon">@drawable/move_to_folder_dark</item>
+        <item name="sortIcon">@drawable/sort_dark</item>
         <item name="appBarTextTheme">@style/PrivacyBrowserAppBarDark</item>
         <item name="tabLayoutTheme">@style/PrivacyBrowserTabLayoutDark</item>
         <item name="popupsTheme">@style/PrivacyBrowserPopupsDark</item>
index c2b97dfb7ffed9aa136e9d4f788539013308e615..62e251c2c32e4686ba3979328ee88a688cc8f1e4 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  Copyright © 2017-2018 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2017-2019 Soren Stoutner <soren@stoutner.com>.
 
   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
 
@@ -63,4 +63,5 @@
     <attr name="editIcon" format="reference" />
     <attr name="moveToFolderIcon" format="reference" />
     <attr name="aboutIcon" format="reference" />
+    <attr name="sortIcon" format="reference" />
 </resources>
\ No newline at end of file
index b37c1a0d354168d8bf6b7f928bbab6fc25093451..cfe0caad0f8f8e0c6875f32f5ab7cc1ffeef1fcd 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  Copyright © 2015-2018 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2015-2019 Soren Stoutner <soren@stoutner.com>.
 
   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
 
     <string name="bookmarks_database_view">Bookmarks Database View</string>
     <string name="all_folders">All Folders</string>
     <string name="home_folder">Home Folder</string>
+    <string name="sort">Sort</string>
+        <string name="sorted_by_database_id">Sorted by database ID.</string>
+        <string name="sorted_by_display_order">Sorted by display order.</string>
     <string name="database_id">Database ID:</string>
     <string name="folder">Folder:</string>
     <string name="parent_folder">Parent folder:</string>
index 406dc52f615487b4ae0cd3a159bed7bd52e1c877..73954b2cdfa136bf63870b47bab64e0f30cb6489 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  Copyright © 2015-2018 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2015-2019 Soren Stoutner <soren@stoutner.com>.
 
   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
 
@@ -67,6 +67,7 @@
         <item name="selectAllIcon">@drawable/select_all_light</item>
         <item name="editIcon">@drawable/edit_light</item>
         <item name="moveToFolderIcon">@drawable/move_to_folder_light</item>
+        <item name="sortIcon">@drawable/sort_light</item>
         <item name="actionBarPopupTheme">@style/PrivacyBrowserPopupsLight</item>
         <item name="appBarTextTheme">@style/PrivacyBrowserAppBarWhiteText</item>
         <item name="tabLayoutTheme">@style/PrivacyBrowserTabLayoutLight</item>
         <item name="selectAllIcon">@drawable/select_all_dark</item>
         <item name="editIcon">@drawable/edit_dark</item>
         <item name="moveToFolderIcon">@drawable/move_to_folder_dark</item>
+        <item name="sortIcon">@drawable/sort_dark</item>
         <item name="appBarTextTheme">@style/PrivacyBrowserAppBarDark</item>
         <item name="tabLayoutTheme">@style/PrivacyBrowserTabLayoutDark</item>
         <item name="popupsTheme">@style/PrivacyBrowserPopupsDark</item>