Invert the items in the navigation menu when using a bottom appbar. https://redmine...
authorSoren Stoutner <soren@stoutner.com>
Wed, 9 Jun 2021 20:42:42 +0000 (13:42 -0700)
committerSoren Stoutner <soren@stoutner.com>
Wed, 9 Jun 2021 20:42:42 +0000 (13:42 -0700)
app/src/main/res/layout/main_framelayout_bottom_appbar.xml
app/src/main/res/layout/main_framelayout_top_appbar.xml
app/src/main/res/menu/webview_navigation_menu.xml [deleted file]
app/src/main/res/menu/webview_navigation_menu_bottom_appbar.xml [new file with mode: 0644]
app/src/main/res/menu/webview_navigation_menu_top_appbar.xml [new file with mode: 0644]

index 2f295dfb0c8648499d2ff30e558def1e9a7f6915..98e16b671acf0b75d8b0a3f48bb7ee6854439e8a 100644 (file)
             android:layout_height="match_parent"
             android:layout_width="wrap_content"
             android:layout_gravity="start"
-            app:menu="@menu/webview_navigation_menu"
+            app:menu="@menu/webview_navigation_menu_bottom_appbar"
             app:itemIconTint="?attr/navigationIconTintColor" />
 
         <!-- Include the bookmarks drawer, which varies based on screen width. -->
index fd9d426e29dca89b8a17464d8cb4152cffe76378..5d0da8de0bc5528111ef18e24d4e6928ea0e9303 100644 (file)
             android:layout_height="match_parent"
             android:layout_width="wrap_content"
             android:layout_gravity="start"
-            app:menu="@menu/webview_navigation_menu"
+            app:menu="@menu/webview_navigation_menu_top_appbar"
             app:itemIconTint="?attr/navigationIconTintColor" />
 
         <!-- Include the bookmarks drawer, which varies based on screen width. -->
diff --git a/app/src/main/res/menu/webview_navigation_menu.xml b/app/src/main/res/menu/webview_navigation_menu.xml
deleted file mode 100644 (file)
index cc939f2..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2016-2021 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<menu
-    xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <item
-        android:id="@+id/clear_and_exit"
-        android:title="@string/clear_and_exit"
-        android:icon="@drawable/download_with_external_app_enabled_day"
-        android:orderInCategory="10" />
-
-    <!-- If a group has an id, a line is drawn above it in the navigation view. -->
-    <group
-        android:id="@+id/navigation_group" >
-
-        <item
-            android:id="@+id/home"
-            android:title="@string/home"
-            android:icon="@drawable/home_enabled_day"
-            android:orderInCategory="20" />
-
-        <item
-            android:id="@+id/back"
-            android:title="@string/back"
-            android:icon="@drawable/back"
-            android:orderInCategory="30" />
-
-        <item
-            android:id="@+id/forward"
-            android:title="@string/forward"
-            android:icon="@drawable/forward"
-            android:orderInCategory="40" />
-
-        <item
-            android:id="@+id/history"
-            android:title="@string/history"
-            android:icon="@drawable/history"
-            android:orderInCategory="50" />
-
-        <item
-            android:id="@+id/open"
-            android:title="@string/open"
-            android:icon="@drawable/proxy_enabled_day"
-            android:orderInCategory="60" />
-    </group>
-
-    <!-- If a group has an id, a line is drawn above it in the navigation view. -->
-    <group
-        android:id="@+id/features_group" >
-
-        <item
-            android:id="@+id/requests"
-            android:title="@string/requests"
-            android:icon="@drawable/block_ads_enabled_day"
-            android:orderInCategory="70" />
-
-        <item
-            android:id="@+id/downloads"
-            android:title="@string/downloads"
-            android:icon="@drawable/downloads_enabled_day"
-            android:orderInCategory="80" />
-    </group>
-
-    <!-- If a group has an id, a line is drawn above it in the navigation view. -->
-    <group
-        android:id="@+id/settings_group" >
-
-        <item
-            android:id="@+id/domains"
-            android:title="@string/domains"
-            android:icon="@drawable/domains_day"
-            android:orderInCategory="90" />
-
-        <item
-            android:id="@+id/settings"
-            android:title="@string/settings"
-            android:icon="@drawable/settings"
-            android:orderInCategory="100" />
-
-        <item
-            android:id="@+id/import_export"
-            android:title="@string/import_export"
-            android:icon="@drawable/import_export"
-            android:orderInCategory="110" />
-
-        <item
-            android:id="@+id/logcat"
-            android:title="@string/logcat"
-            android:icon="@drawable/bug"
-            android:orderInCategory="120" />
-    </group>
-
-    <!-- If a group has an id, a line is drawn above it in the navigation view. -->
-    <group
-        android:id="@+id/info_group" >
-
-        <item
-            android:id="@+id/guide"
-            android:title="@string/guide"
-            android:icon="@drawable/guide"
-            android:orderInCategory="130" />
-
-        <item
-            android:id="@+id/about"
-            android:title="@string/about"
-            android:icon="@drawable/about_day"
-            android:orderInCategory="140" />
-    </group>
-</menu>
\ No newline at end of file
diff --git a/app/src/main/res/menu/webview_navigation_menu_bottom_appbar.xml b/app/src/main/res/menu/webview_navigation_menu_bottom_appbar.xml
new file mode 100644 (file)
index 0000000..32c3a02
--- /dev/null
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2016-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+    <item
+        android:id="@+id/about"
+        android:title="@string/about"
+        android:icon="@drawable/about_day"
+        android:orderInCategory="10" />
+
+    <item
+        android:id="@+id/guide"
+        android:title="@string/guide"
+        android:icon="@drawable/guide"
+        android:orderInCategory="20" />
+
+    <!-- If a group has an id, a line is drawn above it in the navigation view. -->
+    <group android:id="@+id/settings_group" >
+        <item
+            android:id="@+id/logcat"
+            android:title="@string/logcat"
+            android:icon="@drawable/bug"
+            android:orderInCategory="30" />
+
+        <item
+            android:id="@+id/import_export"
+            android:title="@string/import_export"
+            android:icon="@drawable/import_export"
+            android:orderInCategory="40" />
+
+        <item
+            android:id="@+id/settings"
+            android:title="@string/settings"
+            android:icon="@drawable/settings"
+            android:orderInCategory="50" />
+
+        <item
+            android:id="@+id/domains"
+            android:title="@string/domains"
+            android:icon="@drawable/domains_day"
+            android:orderInCategory="60" />
+    </group>
+
+    <!-- If a group has an id, a line is drawn above it in the navigation view. -->
+    <group android:id="@+id/features_group" >
+        <item
+            android:id="@+id/downloads"
+            android:title="@string/downloads"
+            android:icon="@drawable/downloads_enabled_day"
+            android:orderInCategory="70" />
+
+        <item
+            android:id="@+id/requests"
+            android:title="@string/requests"
+            android:icon="@drawable/block_ads_enabled_day"
+            android:orderInCategory="80" />
+    </group>
+
+    <!-- If a group has an id, a line is drawn above it in the navigation view. -->
+    <group android:id="@+id/navigation_group" >
+        <item
+            android:id="@+id/open"
+            android:title="@string/open"
+            android:icon="@drawable/proxy_enabled_day"
+            android:orderInCategory="90" />
+
+        <item
+            android:id="@+id/history"
+            android:title="@string/history"
+            android:icon="@drawable/history"
+            android:orderInCategory="100" />
+
+        <item
+            android:id="@+id/forward"
+            android:title="@string/forward"
+            android:icon="@drawable/forward"
+            android:orderInCategory="110" />
+
+        <item
+            android:id="@+id/back"
+            android:title="@string/back"
+            android:icon="@drawable/back"
+            android:orderInCategory="120" />
+
+        <item
+            android:id="@+id/home"
+            android:title="@string/home"
+            android:icon="@drawable/home_enabled_day"
+            android:orderInCategory="130" />
+    </group>
+
+    <!-- If a group has an id, a line is drawn above it in the navigation view. -->
+    <group android:id="@+id/clear_and_exit_group" >
+        <item
+            android:id="@+id/clear_and_exit"
+            android:title="@string/clear_and_exit"
+            android:icon="@drawable/download_with_external_app_enabled_day"
+            android:orderInCategory="140" />
+    </group>
+</menu>
\ No newline at end of file
diff --git a/app/src/main/res/menu/webview_navigation_menu_top_appbar.xml b/app/src/main/res/menu/webview_navigation_menu_top_appbar.xml
new file mode 100644 (file)
index 0000000..cfb10c7
--- /dev/null
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2016-2021 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+
+    <item
+        android:id="@+id/clear_and_exit"
+        android:title="@string/clear_and_exit"
+        android:icon="@drawable/download_with_external_app_enabled_day"
+        android:orderInCategory="10" />
+
+    <!-- If a group has an id, a line is drawn above it in the navigation view. -->
+    <group android:id="@+id/navigation_group" >
+        <item
+            android:id="@+id/home"
+            android:title="@string/home"
+            android:icon="@drawable/home_enabled_day"
+            android:orderInCategory="20" />
+
+        <item
+            android:id="@+id/back"
+            android:title="@string/back"
+            android:icon="@drawable/back"
+            android:orderInCategory="30" />
+
+        <item
+            android:id="@+id/forward"
+            android:title="@string/forward"
+            android:icon="@drawable/forward"
+            android:orderInCategory="40" />
+
+        <item
+            android:id="@+id/history"
+            android:title="@string/history"
+            android:icon="@drawable/history"
+            android:orderInCategory="50" />
+
+        <item
+            android:id="@+id/open"
+            android:title="@string/open"
+            android:icon="@drawable/proxy_enabled_day"
+            android:orderInCategory="60" />
+    </group>
+
+    <!-- If a group has an id, a line is drawn above it in the navigation view. -->
+    <group android:id="@+id/features_group" >
+        <item
+            android:id="@+id/requests"
+            android:title="@string/requests"
+            android:icon="@drawable/block_ads_enabled_day"
+            android:orderInCategory="70" />
+
+        <item
+            android:id="@+id/downloads"
+            android:title="@string/downloads"
+            android:icon="@drawable/downloads_enabled_day"
+            android:orderInCategory="80" />
+    </group>
+
+    <!-- If a group has an id, a line is drawn above it in the navigation view. -->
+    <group android:id="@+id/settings_group" >
+        <item
+            android:id="@+id/domains"
+            android:title="@string/domains"
+            android:icon="@drawable/domains_day"
+            android:orderInCategory="90" />
+
+        <item
+            android:id="@+id/settings"
+            android:title="@string/settings"
+            android:icon="@drawable/settings"
+            android:orderInCategory="100" />
+
+        <item
+            android:id="@+id/import_export"
+            android:title="@string/import_export"
+            android:icon="@drawable/import_export"
+            android:orderInCategory="110" />
+
+        <item
+            android:id="@+id/logcat"
+            android:title="@string/logcat"
+            android:icon="@drawable/bug"
+            android:orderInCategory="120" />
+    </group>
+
+    <!-- If a group has an id, a line is drawn above it in the navigation view. -->
+    <group android:id="@+id/info_group" >
+        <item
+            android:id="@+id/guide"
+            android:title="@string/guide"
+            android:icon="@drawable/guide"
+            android:orderInCategory="130" />
+
+        <item
+            android:id="@+id/about"
+            android:title="@string/about"
+            android:icon="@drawable/about_day"
+            android:orderInCategory="140" />
+    </group>
+</menu>
\ No newline at end of file